Manifest constants - why not 'alias' ?

David Gileadi foo at bar.com
Thu Dec 6 17:40:30 PST 2007


Bill Baxter wrote:
> Alias makes a lot more sense to me than enum.
> 
> alias x = 5;
> alias float[] y = [1.0,2.0,3.0];
> 
> Conceptually, the variable becomes an alias for the literal.
> 
> Enum is short for 'unumeration'.  But manifest constants aren't 
> enumerating anything.  It makes no sense.
> 
> --bb

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.



More information about the Digitalmars-d mailing list