Lazy eval

BCS BCS at pathlink.com
Tue Aug 22 08:42:53 PDT 2006


Unknown W. Brackets wrote:
> Well, if I saw:
> 
> auto new_p = coalesce(p, last_p, new P())
> 
> I would not assume that new P() would be evaluated, unless p and last_p 
> were null.
> 
> The same goes for a lot of macro function usage seen with the C 
> preprocessor.  People are already dealing with this problem.  A lot.
> 
> I like this new feature, and would hate having to type the curlies.  I 
> feel confident I can correctly document my functions and name them such 
> that no one would be confused.
> 

I feel confident I can document all sorts of bazaar things in my own 
code. I also feel confident that if they are allowed/promoted then other 
people will use them and *NOT* document them.

As to others using your/my code, you can put a page and a half of 
documentation in warning about side effects and it wont do one wit of 
good if the other guy doesn't read it. And there is no way to ensure 
that it will get read.

I can just see the buzz now: "Did you hear about the bonehead over in 
XYZ department that messed up the billing program? He didn't read all of 
the comments in the new library and ended up costing the cooperation $n 
million dollars because of this "cool" feature in the D programming 
language. I'll never use a D lib in /my/ work."



More information about the Digitalmars-d mailing list