User Defined Attributes

Walter Bright newshound2 at digitalmars.com
Tue Nov 13 14:24:30 PST 2012


On 11/10/2012 11:15 AM, Jacob Carlborg wrote:
> On 2012-11-10 20:04, Walter Bright wrote:
>
>> Think of it this way. If I have myString.String, and use the strings in
>> it as an attribute in one module, and in another use module use
>> myString.String as an attribute with a totally different meaning, that
>> will not work if plugins are used.
>
> I'm not entirely sure what you're meaning here but if you have two symbols with
> the same name in two different modules their fully qualified names won't be the
> same.
>
> If you're referring to using a string literal as an attribute then that would be
> a bad thing, like we have tried to explain. It's better to use a type which will
> have a unique name.
>
> If I have misunderstood what you're meaning could you provide a code example?
>

That is what I mean, and it also applies to a library type which different 
modules may press into service as attributes.


More information about the Digitalmars-d-announce mailing list