Custom attributes (again)

Adam D. Ruppe destructionator at gmail.com
Fri Apr 6 06:33:48 PDT 2012


On Friday, 6 April 2012 at 06:47:56 UTC, Walter Bright wrote:
> I was thinking of something along the lines of what has been 
> proposed here earlier:
>
>   @attr(identifier = expression)

The identifier in there is a liability because of
name conflicts.

Instead, use typeof(expression) to identify it. Since
two types can't have the same fully qualified name,
it will never conflict.


Jacob and I disagreed on some details, but both our
proposals in the last thread had this in common. Java
does it this way, too.

Here's the other thread:
http://forum.dlang.org/thread/bccwycoexxykfgxvedix@forum.dlang.org


More information about the Digitalmars-d mailing list