Does anyone use 'with' statement?

Oskar Linde oskar.lindeREM at OVEgmail.com
Sun Dec 9 04:43:16 PST 2007


serg kovrov wrote:
> Recently I have studied a (proprietary language) code. The language 
> features 'with' statement in the same sense that D does. To understand 
> what this code sample really do I had to remove all 'with's and 
> fix/compile code many times before it start working as original.
> 
> I don't know why never tried to use it in my own code before, but now I 
> definitely will NOT use it ever. Even if it could save me some typing. I 
> found 'with' far more evil than even 'goto' (which I don't use as well).

I sometimes use it to bring in a certain template instantiation for 
multi-member templates, like:

with(EuclidianSpace!(3,float)) {
   Vector a,b;
   // ...
}


-- 
Oskar



More information about the Digitalmars-d mailing list