[dmd-internals] Changes for pure, nothrow, and @safe done for the moment?

Andrei Alexandrescu andrei at erdani.com
Sun Jun 26 21:16:57 PDT 2011


On 6/26/11 10:56 PM, Don Clugston wrote:
> On 27 June 2011 05:50, Andrei Alexandrescu<andrei at erdani.com>  wrote:
>> On 6/26/11 10:34 PM, Walter Bright wrote:
>>>
>>> I'm going to just back out the warning about pure functions with no
>>> effect.
>>
>> Why? I think that would be a mistake. Roll in any way you wish (after fixing
>> bugs and all), but do roll it it. There's absolutely never a good reason to
>> call a pure function and ignore its result, unless you just want to keep the
>> CPU warm.
>
> Yes there is. In cases where you want to pass an empty delegate
> literal to a function which requires a delegate.

Interesting. I wonder whether empty functions should be handled as a 
special case or are part of a pattern.

Andrei


More information about the dmd-internals mailing list