User Defined Attributes

Walter Bright newshound2 at digitalmars.com
Fri Nov 16 02:41:44 PST 2012


On 11/15/2012 12:22 AM, Jacob Carlborg wrote:
> 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.
>

The whole point of my example was no, you do not necessarily know the meaning of 
a user-defined type that is used as an attribute.


More information about the Digitalmars-d-announce mailing list