DMD 0.148 - scope guard

Walter Bright newshound at digitalmars.com
Sun Feb 26 11:01:51 PST 2006


"Unknown W. Brackets" <unknown at simplemachines.org> wrote in message 
news:dtstki$20os$1 at digitaldaemon.com...
> Honestly, as ugly as the syntax is, I must admit I like the grouping of 
> the start and end conditions together.
>
> That's one thing I've always thought strange about programming; people 
> talk about functions and classes and all the different aesthetic and 
> linear/non-linear relationships between them, but in the end it is all 
> completely and totally linear, when for many cases that doesn't make 
> sense.

Consider the for loop:

    for (expr; expr; expr)

The 3rd expression is executed at the *end* of the loop, yet it is placed at 
the beginning. So there is precedent for the utility of putting code where 
it conceptually belongs rather than where it is executed. 





More information about the Digitalmars-d mailing list