Lazy eval

kris foo at bar.com
Mon Aug 21 20:50:59 PDT 2006


Walter Bright wrote:
> Derek Parnell wrote:
> 
>> On Mon, 21 Aug 2006 16:33:00 -0700, Walter Bright wrote:
>>
>>> The problem with requiring the { } around the argument is that 
>>> programmers just don't like it. I don't think I can make them like it.
>>
>>
>> Huh? You asked them all? You didn't ask me and I like it. 
> 
> 
> Did you use it before 0.165? Did anyone? Everyone I'd show the { } 
> syntax to reacted with zzzzzz. I show them the one without, and all of a 
> sudden they are excited about it and can think of all kinds of uses.


I did, and continue to do so, along with a number of others I know 
working on delegate-oriented systems.

What was unweidly about the prior syntax was simply the return and the 
'superfluous' semicolons. The braces don't get in the way at all, and in 
fact, make it quite clear exactly what is going on.

As it stands now, blatant ambiguities have been introduced. And for what?

> 
> C++ programmers have been trying to do this for over a decade - first 
> with preprocessor macros, and now with expression templates.

Eh. Callbacks have been around for decades. Syntax to support that is 
good or bad depending upon language you choose.

> 
> Perhaps what is so off-putting of this feature, as opposed to out, 
> inout, const, implicit conversions, and other effects that require one 
> to look at the interface, is it's very unusual (even unique?) for a 
> C-like language.

Perhaps, but that doesn't mean the syntax needs to to be ambiguous. Does 
it? We all know that perfectly well.





More information about the Digitalmars-d mailing list