DMD 0.165 release

Sean Kelly sean at f4.ca
Tue Aug 22 06:44:41 PDT 2006


Walter Bright wrote:
> BCS wrote:
>> Walter Bright wrote:
>>> Derek Parnell wrote:
>>>
>>>> On Mon, 21 Aug 2006 11:06:12 -0700, Walter Bright wrote:
>>>>
>>>>> BCS wrote:
>>>>>
>>>>>> given
>>>>>>
>>>>>> void foo(char[]);
>>>>>> void foo(char[] delegate());
>>>>>>
>>>>>> how do I force the use of  the first?
>>>>>
>>>>> You can't. Think of it like:
>>>>>
>>>>> void foo(in int x);
>>>>> void foo(out int y);
>>>>> void foo(inout int z);
>>>>>
>>>>> Can't force the use of one of those, either.
>>>>
>>>>
>>>> But why is that *not* a problem with the language?
>>>
>>>
>>> A good question. I think the answer is that one would be want to 
>>> overload based on in/out/inout only to write obfuscated code.
>>
>> but the lazy vs. non-lazy question isn't so simple
>>
>>
>> log(RunSQLStuff());
>>
>> vs.
>>
>> log("This is a string");
>>
>>
>> ???
> 
> I don't see what the problem is?

I think the problem here might be that it would be more efficient if the 
latter case were not processed through a delegate wrapper.


Sean



More information about the Digitalmars-d-announce mailing list