static if enhancement

cym13 via Digitalmars-d digitalmars-d at puremagic.com
Sat Jun 25 04:27:01 PDT 2016


On Saturday, 25 June 2016 at 10:19:47 UTC, Claude wrote:
> And if some code have too many indentation levels, than it
> probably means it should be better modularized, hence I'd 
> suggest to split it in several sub-functions, it will be more 
> readable/maintainable.

We are talking about early returns (checking for something and
returning as soon as possible) which are a well-known and 
efficient
way to reduce indentation levels and increase modularity. You 
can't
come and say "What? You want it to work? Man, you should have 
thought
your code better!": the very reason this subject is discussed is 
to
allow people to deal with indentation levels!


More information about the Digitalmars-d mailing list