digitalmars.D - The magic meta namespace (again)
- Lars T. Kyllingstad (7/7) Jan 13 2010 D's metaprogramming capabilities is one of its main selling points.
- Clemens (4/14) Jan 13 2010 I support the proposal. However, unless I'm missing something, we can't ...
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
Jan 13 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 -LarsI 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 )".
Jan 13 2010