Proposal: Replace __traits and is(typeof(XXX)) with a 'magic namespace'.

Moritz Warning moritzwarning at web.de
Mon Nov 2 10:41:35 PST 2009


On Mon, 02 Nov 2009 17:47:53 +0100, Don wrote:

> [I'm moving this from deep inside a TDPL thread, since I think it's
> important]
> 
> is(typeof(XXX)) is infamously ugly and unintuitive __traits(compiles,
> XXX) is more comprehensible, but just as ugly.
> 

I like your proposal.
__traits is a rats-hole.

An artificial name-space is a nice place
for compiler build-in methods (maybe smth. other than meta then?).
But I hope it will be able to implement it in the library in the future.
Anyway, it's visual appealing and does look less like a hack.



More information about the Digitalmars-d mailing list