Change some keywords and enum manifests?
bearophile
bearophileHUGS at lycos.com
Tue Apr 27 08:57:59 PDT 2010
Aziz K.:
> Since we've got the attribute syntax (@identifier), wouldn't it be good to
> convert certain keywords to use this syntax?
There was a long thread about this, that I think has gone nowhere, like a stream that goes in the desert and evaporates fully. Some people agree with you that having random usage of @ in a language is not good.
Ellery Newcomer:
> One thing about D that appeals to me is the fact that you don't have to
> type that stupid at symbol for the various attributes. I must be in a
> minority, though.
@ is not a nice thing to see, I think most people agree with you. But it's acceptable for certain usages, for example for attributes with user-defined semantics that aren't used often in the code, like the @readonly I have proposed, etc.
Aziz K.:
> On a related note, I would like to suggest to get rid of the ugly enum
> manifest syntax.
Several persons think that enum used for manifest constants is just a hack. This too was discussed, but I think Walter is not interested in improving this.
Recently I have also suggested to replace the keyword "immutable" with something shorter, because I am writing it often in the code, something like "val", as used in Scala. But this has not gotten lot of interest from people.
> > @manifest int x = 2010; // we use this. :-) :D
I don't like that a lot :-) It's almost worse than "enum". Try again.
Bye,
bearophile
More information about the Digitalmars-d
mailing list