Attributes

Craig Black cblack at ara.com
Fri Dec 22 21:20:37 PST 2006


C# has a feature called "attributes" that allows metadata to be extended
with custom information.  This would be very useful in D.  Basic support for
attributes in D would be possible by adding an array of objects to the
TypeInfo class.  Developers would need the ability to add attributes, and
retrieve attributes from this array.

This feature seems easy to implement and has a great deal of utility.
Without boring anyone with details, it would make my code much more elegant
in many ways.  It would also open up some interesting new possiblities
including fast dispatch for multimethods.

-Craig





More information about the Digitalmars-d mailing list