Feature Request: Keyword as identifier.
J Duncan
me at nospam.com
Mon Oct 2 15:15:06 PDT 2006
Stewart Gordon wrote:
> Don Clugston wrote:
> <snip>
>
>> I proposed a keyword called 'identifier':
>>
>> extern(C) int identifier("version")();
>>
>> As well as solving this problem, it would add the most powerful
>> remaining C preprocessor feature (token pasting) into the D template
>> system. Serious magic. Although D has no shortage of magic already <g>.
>
>
> What practical uses are there for token pasting in D?
>
> Stewart.
>
I can think of many uses of token pasting, the most obvious to allow a
mixin to programatically create identifiers (which would be a boon to
the severely limited mixins). combine it with reflection and you have
all sorts of fun options with generating code
More information about the Digitalmars-d
mailing list