DIP 50 - AST macros

deadalnix deadalnix at gmail.com
Sun Nov 17 19:14:22 PST 2013


On Sunday, 17 November 2013 at 20:48:15 UTC, Walter Bright wrote:
>> That never was in the DIP.
>
> It was this by Timon Gehr essentially posting why lazy 
> parameters weren't good enough:
>
>> On 11/13/2013 08:25 PM, Walter Bright wrote:
>>>>
>>>
>>> Ah, found the code:
>>>
>>> void ifthen(bool cond, lazy void dg)
>>> {
>>>     if (cond)
>>>         dg();
>>> }
>>
>> int foo(int x){
>>    ifthen(!x, return 2); // uh oh
>>    return 3;
>> }

As I understand it, Timon choosed that syntax simply to 
demonstrate the limitation of your proposal using a similar 
syntax. Not to propose a syntax.


More information about the Digitalmars-d mailing list