dst = src rather than src dst

Robert Fraser fraserofthenight at gmail.com
Wed Sep 5 11:10:51 PDT 2007


Janice Caron Wrote:

> Please could D allow the following syntaxes
> 
> alias dst = src;
> typedef dst = src;
> 
> Instead of (or as well as)
> 
> alias src dst;
> typedef src dst;
> 
> I just prefer the destination on the left. Moreover, it would make for greater 
> consistency throughout D. It would match up with assignment operators, module 
> import renaming, and alias template specializations.
> 

I think it was done this way to maintain consistency with C's typedefs. Personally, I like the existing syntax, but I see no reason the other shouldn't be added as an alternative.



More information about the Digitalmars-d mailing list