feature request: __ARGS__ for logging (cf __FILE__, __LINE__, __FUNC___)

Timon Gehr timon.gehr at gmx.ch
Wed Feb 6 06:57:20 PST 2013


On 02/06/2013 03:23 PM, Jacob Carlborg wrote:
> On 2013-02-06 14:05, Timon Gehr wrote:
>
>> Yes, but it is not clear yet what macro closures are exactly (Probably
>> it would make sense to inject the closed over declarations at the call
>> site, without adding them to the scope.)
>
> It's not clear? We want to be able have a macro referring to utility
> functions and these should be bind at the macro site and not call site.
>

Of course. What I mean by macro closure is the following:

Ast foo(){
     int x = 0;    // a 'closed over' variable
     return <[x]>; // escaping reference
}

macro counter(){ return $(foo())++; }


More information about the Digitalmars-d mailing list