A question about programming practices: I am watching a video by a sociologist w...
⏚ Antoine Chambert-Loir @antoinechambertloir@mathstodon.xyz
A question about programming practices: I am watching a video by a sociologist who observes programmers using AI, and one of their request is to avoid the deep if/else alternatives and to replace them by early returns.
Is it a reasonable practice?
I would have guessed that on the opposite, having such clear disjunctions would clarify the logic of the code.
Cf. this website:
https://bratadeep.com/blog/replacing-nested-if-else