custom attribute proposal (yeah, another one)

Jacob Carlborg doob at me.com
Sat Apr 7 09:48:00 PDT 2012


On 2012-04-07 05:29, Kapps wrote:

> I slightly prefer this function method over the struct method because:
> 1) No need to generate a custom struct for everything. Plenty of things
> are just a true or false, or a string. Saves a little bit of TypeInfo
> generation.

But you still need to create a function.

> 2) The more important one: The possibility to eventually include an
> alias template parameter. This allows things like looking up whether the
> symbol with the attribute has other attributes applied, or determining
> type. This allows things like constraints, and can be a nice benefit.

This can't be done for structs?

-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list