User Defined Attributes

Walter Bright newshound2 at digitalmars.com
Wed Nov 14 13:13:29 PST 2012


On 11/14/2012 2:53 AM, Jacob Carlborg wrote:
> If "std.mytypes.mystring" is a variable of the type "string" then the fully
> qualified name is lost if it's used as an attribute. Something like this:

I am having a REALLY hard time making my point here.

struct MyString
{
      string s;
}

Now use MyString as an attribute. No, the name is not lost. Yes, two different 
modules can use MyString as an attribute, and impute completely different 
meanings into it.

Just because it is not a builtin type does not change anything.


More information about the Digitalmars-d-announce mailing list