A question about programming practices: I am watching a video by a sociologist w...

@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:
bratadeep.com/blog/replacing-n