Template-based Preprocessing
Walter Bright
newshound at digitalmars.com
Mon Sep 4 15:17:22 PDT 2006
Don Clugston wrote:
> I've previously suggested the 'identifier' keyword for string pasting.
> Stringizing is already possible, you can find the code for
> symbolnameof!() in dsource/ddl/meta, together with qualifiednameof!()
> which is significantly more powerful than anything in C++.
> With identifier, you'd write:
>
> string identifier("serialize_" ~ symbolnameof!(I))() {
> return toString(I);
> }
Not a bad idea, but it would require a lot of internal rewriting of the
compiler to implement.
More information about the Digitalmars-d
mailing list