On 2012-11-06 08:55, Walter Bright wrote:
References:
http://www.digitalmars.com/d/archives/digitalmars/D/Custom_attributes_again_163042.html
http://www.digitalmars.com/d/archives/digitalmars/D/custom_attribute_proposal_yeah_another_one_163246.html
Inspired by a gallon of coffee, I decided to get it implemented. It's
simple, based on what D already does (CTFE and heterogeneous tuples),
easy to implement, easy to understand, and doesn't break anything. It
should do everything asked for in the above references (except it's not
a type constructor).
This is so cool. Although I would have expected it to have a slightly
different syntax. Also have a more key-value like mapping, something
like this:
@mtype("key" : "value") int a; or @mtype(key : "value") int a;
@mtype(key : "val1", key2 : "val2") int foo;
@mtype("value") int b;
@mtype int c;
Not it's just a bunch of values attached to a symbol, as I see it.
--
/Jacob Carlborg