Can your programming language do this?

Jacob Carlborg doob at me.com
Tue Jan 25 09:56:40 PST 2011


On 2011-01-25 17:41, Piotr Szturmaj wrote:
> Andrew Wiley wrote:
>> I know I keep beating this horse, but in other languages, this is the
>> textbook example for why annotations are useful. Adding metadata to
>> code, even if it can only be examined at compile time, can be immensely
>> useful.
>
> I fully agree. However, I did create some substitute:
>
> struct City
> {
> Serial!int id; // auto increment
> string name;
>
> mixin PrimaryKey!(id);
> mixin Unique!(name);
> }
>
> but still, legal attributes such as .NET ones would be more appreciated.

That would be really nice to have.

-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list