Making Metaprogramming Pleasant and Fun
Sergey Gromov
snake.scaly at gmail.com
Sun Aug 30 13:37:09 PDT 2009
Mon, 24 Aug 2009 00:25:19 -0400, Chad J wrote:
> Suggestion 1:
>
> For any template whose argument list ends with a string argument, such
> as this one:
>
> template foo( T, string arg )
> {
> ...
> }
>
> ... allow it to be instantiated (or mixed in) like so:
>
> foo!(T)
> {
> // Some token string.
> }
>
> or
>
> mixin foo!(T)
> {
> // Some token string.
> }
I agree it would be nice to add some sugar to mixin usage. But I'm
afraid this particular proposal has too many corner cases and parsing
ambiguities. I cannot point out any right now, it's just an impression.
More information about the Digitalmars-d
mailing list