D dropped in favour of C# for PSP emulator

Artur Skawina art.08.09 at gmail.com
Fri May 11 13:02:06 PDT 2012


On 05/11/12 20:38, Mehrdad wrote:
> On Friday, 11 May 2012 at 18:21:24 UTC, H. S. Teoh wrote:
>> Templates are stencils for generating code. There's nothing confusing about that.
> 
> 
> "Stencils for generating code"? _This_??! :O
> 
>   template hasMember(T, string name)
>   { enum hasMember = __traits(hasMember, T, name); }
> 
> 
> Imagine a new user's confusion when seeing something like this.
> (Not sure I got it exactly right, but my point is there.)

Yeah, the eponymous template syntax is confusing. Something like

   template enum hasMember(T, string name) = __traits(hasMember, T, name);

would be more intuitive, but i'm not sure yet if it would also work for
more complex cases. Together with a new alias syntax it could make 

   template alias ID(A...) = A;

etc possible.

artur


More information about the Digitalmars-d mailing list