User Defined Attributes

Walter Bright newshound2 at digitalmars.com
Fri Nov 16 11:09:38 PST 2012


On 11/14/2012 2:18 AM, Leandro Lucarella wrote:
> Can you provide one concrete case where it makes sense NOT to restrict UDAs to
> types

One where its use is entirely inside the scope of a module, i.e. local use of 
it. There seems to be an assumption that UDAs are global, but I don't see a 
reason why that should always be true.


> and it's different from restricting exception to classes derived from
> Exception?

Exceptions leak out of their scopes as an explicit part of their nature. That's 
the whole point of them, and I think that's the fundamental difference.


More information about the Digitalmars-d-announce mailing list