DMD 0.165 release
BCS
BCS at pathlink.com
Mon Aug 21 11:19:37 PDT 2006
Walter Bright wrote:
> BCS wrote:
>
>> Walter Bright wrote:
>>
>>> I was going to call this 1.0 RC1, but I just could not resist adding
>>> the lazy expression evaluation. This adds one of the big capabilities
>>> of common lisp.
>>>
>>> http://www.digitalmars.com/d/changelog.html
>>
>>
>> cool, I like it
>>
>> given
>>
>> void foo(char[]);
>> void foo(char[] delegate());
>>
>> how do I force the use of the first?
>
>
> You can't.
>
Ouch!
That could be bad where the evaluation of the expression has side
effects or is time (when not how long) critical.
volatile char* vcp;
log("data is now: "~(vcp[0..10].dup));
Will the (char[]) form ever get called?
Any expression can be converted into a anon-delegate, so anything that
would work for the first, also works for the second. How is one picked
over the other?
This seems to be an "oddity" in the overload rules.
More information about the Digitalmars-d-announce
mailing list