On 2012-11-07 12:05, Leandro Lucarella wrote:

OK, that's another thing. And maybe a reason for listening to people having
more experience with UDAs than you.

For me the analogy with Exceptions is pretty good. The issues an conveniences
of throwing anything or annotating a symbol with anything instead of just
type are pretty much the same. I only see functions making sense to be accepted
as annotations too (that's what Python do with annotations, @annotation symbol
is the same as symbol = annotation(symbol), but is quite a different language).

I start to more and more think it would be better to explicitly require the developer to declare an attribute, like:

attribute foo
{
    string name;
}

@foo("asd") int a;

--
/Jacob Carlborg

Reply via email to