User Defined Attributes

Jacob Carlborg doob at me.com
Thu Nov 8 23:29:30 PST 2012


On 2012-11-08 19:03, Max Samukha wrote:

> The problem is where to draw the line. There is nothing to stop an idiot
> programmer from applying your attributes to a wrong target, so we'd
> better take care of that by introducing those target-restricting
> attributes specially treated by the compiler.

Sure, but we don't want to have a comment for every struct indented as 
an attribute saying "this is an attribute". We do have "const", "pure", 
"nothrow" and so on for a reason. We want the compiler to be able to 
force/validate our intent and not have to write the intention in the 
documentation.

-- 
/Jacob Carlborg


More information about the Digitalmars-d-announce mailing list