Growing a Language (applicable to @attribute design)

Andrej Mitrovic andrej.mitrovich at gmail.com
Tue Nov 13 17:16:05 PST 2012


On 11/14/12, Walter Bright <newshound2 at digitalmars.com> wrote:
> Particularly, should we allow:
>
>     @identifier
>
> as a user-defined attribute, in potential conflict with future reserved
> attribute words, or not?

I would argue that we should strive to implement most new attributes
into libraries. Every time you make an attribute a language feature it
means all compilers must implement it (+ it increases the perceived
complexity of the language). And since we're constantly improving
reflection capabilities of the language most attributes should become
implementable in a library sooner or later.

There are some attributes that would probably be very hardor
impossible to implement in a library, e.g. @property ("..waits for
someone to scream AST macros"), but I think there should be very few
of those.

I don't think we'll have much conflicts. Can you think of any future
attributes that should be part of the language? I could think of
@inline, but that's hardly implementable in a library, so no conflicts
there.


More information about the Digitalmars-d mailing list