Proposal: user defined attributes

Jacob Carlborg doob at me.com
Wed Mar 21 00:19:58 PDT 2012


On 2012-03-20 22:36, deadalnix wrote:

> It is more tricky if the property isn't a simple attribute to read.
> Again, consider what is done with this simple example :
> http://projectlombok.org/
>
> We have the opportunity here to introduce in D the concept of aspect
> oriented programming. This is HUGE. If you are afraid of the addition of
> a functionnality to the language, don"t worry, you are not just adding a
> functionnality, but a whole new paradigm.
>
> And, BTW, this would allow us to drop some functionalities that now can
> be provided by phobos (synchronized for example is an obvious one). Same
> goes for override, deprecated, and the fun thing is that we can
> implement our own to extends the language even more as lib.
>
> Even the propagation of pure, @safe, nothrow and const that has been
> discussed recently can be done with that feature.
>
> If you are worried about introducing language features (I am) you should
> definitively introduce that one, because lot of features has already
> been included just because that one is lacking.
>
> Adding compile time information to a type is the visible part of the
> iceberg. Really.

I couldn't agree more.

-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list