About @ and UDA
Andrea Fontana via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Wed Apr 15 01:53:05 PDT 2015
My 2 cents. If I remember correctly, "@" prefix in @safe,
@trusted, @system, etc was added just to avoid keywords
pollution, right?
Now UDA uses the same prefix: if some new
keywords/properties/attributes will be added to D, the same
problem will come back again... Is it a crazy idea to deprecate @
for UDAs in favor of something else like #? In this way @xxx will
be a language attribute and #xxx will be a user defined
attribute. No pollution, no clashes.
Maybe it's not too late to do this change. I think it will be not
a big effort to replace uda syntax in existing projects (a
deprecation warning will help).
Andrea
More information about the Digitalmars-d-learn
mailing list