The magic meta namespace (again)

Clemens eriatarka84 at gmail.com
Wed Jan 13 07:47:20 PST 2010


Lars T. Kyllingstad Wrote:

> D's metaprogramming capabilities is one of its main selling points. 
> Unfortunately, two of the most important metaprogramming constructs, 
> __traits(xxx) and is(typeof(xxx)), are butt ugly.
> 
> Don made a proposal to mend this situation, which I've now added to 
> Bugzilla. Please vote for it if you care:
> 
>    http://d.puremagic.com/issues/show_bug.cgi?id=3702
> 
> -Lars

I support the proposal. However, unless I'm missing something, we can't completely eliminate is() expression as the proposal states, since they also do other things not covered by compiles():

http://digitalmars.com/d/2.0/expression.html#IsExpression

It might be possible to map the other usages of is() to other pseudofunctions in the meta namespace and indeed remove it. On the other hand, the syntax "is(x : int)" seems intuitive enough to me. I wouldn't shed a tear for some of the more obscure ones, like the confusing "is ( Type Identifier )".




More information about the Digitalmars-d mailing list