Steven Schveighoffer wrote:
On Fri, 06 Apr 2012 13:33:33 -0400, Tove <t...@fransson.se> wrote:
I think this proposal pretty much covers what I would expect from
'custom attributes'... but what about adding a D twist, getting "what
we annotate" as a template parameter so that one among other things
can make use of Template Constraints?

Interesting, so something like:

@attribute string defaultName(T)() if(is(typeof(T.init.name))) { return
T.init.name;}

Not sure how much this gives us, but it definitely feels doable.

See also: http://forum.dlang.org/post/jlmtcv$v09$1...@digitalmars.com

Reply via email to