Can your programming language do this?
Piotr Szturmaj
bncrbme at jadamspam.pl
Tue Jan 25 08:41:18 PST 2011
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.
More information about the Digitalmars-d
mailing list