Le 07/11/2012 21:35, Walter Bright a écrit :
On 11/7/2012 4:01 AM, Jacob Carlborg wrote:
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;

Adding a whole new aggregate type is a pretty intrusive and major change.


So let's defined in object.d the following :

@attribute struct attribute {}

And then mark as @attribute anything that may used as attribute.

@attribute struct foo {
        string name;
}

@foo("asd") int a;

If wasn't marked as @attribute, it wouldn't be an valid attribute.

Reply via email to