Why the @ in @safe? & UDAs
Jesse Phillips
Jesse.K.Phillips+D at gmail.com
Wed Nov 6 18:17:40 PST 2013
On Thursday, 7 November 2013 at 02:04:37 UTC, Adam D. Ruppe wrote:
> On Thursday, 7 November 2013 at 00:13:49 UTC, Shammah
> Chancellor wrote:
>> My understanding is that @ attributes were for used-defined
>> behavior only.
>
> It is all a historical thing... at first, all new things were
> done as keywords. Then around the time @safe came around, they
> were changing their minds and new things became @keywords.
> Then, some time after that, UDAs came around and used the @
> syntax.
More specifically, the discussion was around properties and how
to handle them. User-Defined attributes were also being thrown
around, and at some point a suggestion combined the two
suggesting properties be denoted with @property. Some time passed
and suddenly D could parse @property on functions (@safe may have
been added at the same time, or a little later). No UDA[1] was
introduced.
1. http://prowiki.org/wiki4d/wiki.cgi?LanguageDevel/DIPs/DIP6
More information about the Digitalmars-d
mailing list