dst = src rather than src dst

James Dennett jdennett at acm.org
Thu Sep 6 21:11:18 PDT 2007


Robert Fraser wrote:
> 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.

Interestingly, C++ is introducing something like

using newname = oldname;

which, as a simple case, can replace the existing typedef
notation

typedef oldname newname;

-- James



More information about the Digitalmars-d mailing list