User Defined Attributes

Jacob Carlborg doob at me.com
Thu Nov 15 00:22:33 PST 2012


On 2012-11-14 22:13, Walter Bright wrote:

> I am having a REALLY hard time making my point here.
>
> struct MyString
> {
>       string s;
> }
> Just because it is not a builtin type does not change anything.

Sure you _can_ but it would be quite stupid. With user defined types 
there is at least some context. With a plain string (or any built in 
type) it can come from any where and mean anything.

The difference is, with a user defined type you know the meaning of the 
attribute, with a built in type you do not, not in the same way at least.

-- 
/Jacob Carlborg


More information about the Digitalmars-d-announce mailing list