Annotations, was Re: Custom attributes C#
Jari-Matti Mäkelä
jmjmak at utu.fi.invalid
Thu Sep 27 13:33:47 PDT 2007
Jari-Matti Mäkelä wrote:
> Daniel Keep wrote:
>
>> The point is to give programmers a way of adding extra information about
>> a declaration that you wouldn't normally be able to convey.
>>
>> Granted, you *could* do this in D right now; in much the same way you
>> can do OO programming in assembler. You could probably fake it with
>> variadic templates and structs, etc., but it'd be ugly as heck.
>
> Makes me think that maybe e.g. 'unittest', 'deprecated' and pragma should
> have been annotations instead of keywords. Annotations feel a much more
> extensible facility than a fixed set of keywords. I'm not really sure what
> benefits the C# syntax has over @java @annotations, but D (or at least
> tools) could really have a use for annotations in general. The language
> should not dictate what 3rd party tools can and cannot do.
I guess this is yet another good example of the principle that the simpler
the core language, the more it actually allows one to do.
More information about the Digitalmars-d
mailing list