User Defined Attributes

Walter Bright newshound2 at digitalmars.com
Tue Nov 6 20:19:35 PST 2012


On 11/6/2012 7:52 PM, bearophile wrote:
> Walter Bright:
>
>> But I'm not sure at this point if that is the right thing to do.
>
> Why?

D was fortunate in having 10 years of experience with C++'s exception system to 
learn from. We don't have that with UDAs.


> [If you decide to restrict UDAs, then later it will be easy to extend them, it
> will not break code. While doing the opposite break code. It's you the one that
> has taught me to design things this way :-) ]

It's a good point, but I have no experience with UDAs. There may be emergent 
behavior with these features that is completely unexpected, and we wouldn't find 
out about it without having it there.

Yes, I know it's a risk.

(And it was a no-brainer to restrict the exception types. But one must be 
careful in drawing analogies in programming, as different things are, well, 
different and can be different in unexpected, surprising ways.)



More information about the Digitalmars-d-announce mailing list