Deep nesting vs early returns

Jonathan M Davis newsgroup.d at jmdavisprog.com
Fri Oct 5 21:34:38 UTC 2018


On Tuesday, October 2, 2018 12:14:55 PM MDT Andrei Alexandrescu via 
Digitalmars-d wrote:
> Kate Gregory makes a good argument on something I've often commented in
> code reviews: https://youtu.be/n0Ak6xtVXno?t=2682

It's one of those things that I would have thought would just be obvious
with experience, but if nothing else, some folks still try to stick to the
whole "single return" idea even though I think that most folks agree at this
point that it causes more problems than it solves.

Certainly, if you try to do it both ways, it shouldn't take long to see
exactly what she shows in your own code.

- Jonathan M Davis





More information about the Digitalmars-d mailing list