code folding

Entity325` via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri Mar 17 22:00:48 PDT 2017


FYI,
>static if(true)//comments are great for adding some context to 
>your code.
>{
>    //stuff
>}
and
>{//let's toss a comment on the scope declaration!
>    //stuff
>}
are functionally equivalent in my IDE. Both will fold down to 
only the top {(good), and both create a scope outside of which no 
declarations inside them are visible(potentially undesirable 
side-effects).

If you need to sequester your code, you really should just toss 
it into a library and import it from there(no side-effects).


More information about the Digitalmars-d-learn mailing list