dst = src rather than src dst

Nathan Reed nathaniel.reed at gmail.com
Wed Sep 5 18:23:18 PDT 2007


Kirk McDonald wrote:
> The fact that the syntax looks nothing like assignment underscores the 
> fact that /it is not an assignment/. I would classify the proposal as a 
> foolish consistency, but I wouldn't really care if it were added. 
> (Except that adding redundant syntaxes for the same operation is rarely 
> a good idea.)
> 

I second the proposal someone already made of allowing

alias Foo as Bar;

This doesn't look like an assignment, but makes the declaration more 
readable and allows one to easily remember which identifier is the alias 
being created (at least, if one is a native English speaker...) at the 
slight cost of adding the keyword 'as'.  The 'as' could be optional so 
as not to break existing code.

Thanks,
Nathan Reed



More information about the Digitalmars-d mailing list