custom attribute proposal (yeah, another one)

foobar foo at bar.com
Sat Apr 7 23:08:09 PDT 2012


After reading the thread my vote goes to the struct proposal.
The two approaches functions vs. structs are functionally 
equivalent but conceptually structs are preferable. Attributes 
are meta _data_ which is conceptually associated with types 
whereas functions are conceptually associated with behaviour.  
simply put - structs are the more intuitive choice.
There are valid concerns raised about the implementation - code 
bloat, struct default ctor, etc. those are implementation 
concerns that should be handled in the compiler and not in the 
language design.



More information about the Digitalmars-d mailing list