DIP 50 - AST macros
Timon Gehr
timon.gehr at gmx.ch
Sun Nov 17 13:58:29 PST 2013
On 11/17/2013 09:48 PM, Walter Bright wrote:
>
> 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;
>> }
>
This code was just supposed to demonstrate that ifthen is not actually a
"statement" work-alike as claimed in a previous post.
More information about the Digitalmars-d
mailing list