DIP 50 - AST macros

Walter Bright newshound2 at digitalmars.com
Wed Nov 13 13:08:25 PST 2013


On 11/13/2013 12:50 PM, Timon Gehr wrote:
> 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 approach definitely hews to the single-entry/single-exit paradigm.


More information about the Digitalmars-d mailing list