[ ArgumentList ] vs. @( ArgumentList )
Timon Gehr
timon.gehr at gmx.ch
Wed Nov 7 13:16:44 PST 2012
On 11/07/2012 09:20 PM, Walter Bright wrote:
> On 11/7/2012 9:00 AM, Timon Gehr wrote:
>> On 11/06/2012 08:18 PM, Walter Bright wrote:
>>>
>>> @( ArgumentList )
>>>
>>> ...
>>
>> I do not like that one as I already use the syntax.
>
> That currently isn't accepted by the D compiler - what are you already
> using it for?
Text interpolation.
enum d = "c";
mixin(X!"abc@(d)ef"); // -> abccef
I use it mostly for code generation.
mixin(mixin(X!q{
if(@(a)) @(b);
}));
More information about the Digitalmars-d
mailing list