Manifest constants - why not 'alias' ?

Robert Fraser fraserofthenight at gmail.com
Thu Dec 6 22:17:00 PST 2007


mandel wrote:
> On Thu, 06 Dec 2007 21:07:18 -0800, Walter Bright wrote:
> 
>> David Gileadi wrote:
>>> FWIW, alias makes the most sense to me out of the current crop of
>>> suggestions.  To me it says that wherever I see the alias, it will be
>>> replaced with whatever value the alias is for.  That seems to describe
>>> manifest constants exactly.
>> Since there's already:
>>
>> 	alias X Y;
>>
>> it would seem confusing to add:
>>
>> 	alias Y = X;
> 
> I know it was asked before for sure,
> but could someone point out why not just use:
> 
> alias Y 42;
> alias Z "abc";
> alias X [1,2,3];

No type safety.



More information about the Digitalmars-d mailing list