WeakRef updated to support Tango, too

Tomas Lindquist Olsen tomas at famolsen.dk
Thu Feb 14 07:31:21 PST 2008


Bill Baxter wrote:
> Tomas Lindquist Olsen wrote:
>> Minor issue, the 'string' alias should be private, or it may conflict 
>> with aliases made by the user.
> 
> As far as I know, private aliases conflict just like public ones, not so?

The problem is in the modules that import your weakref module. When the alias is public it 
becomes part of the global symbol table (of the importing module) and conflicts with ones own 
alias. If you make it private, imports will not see the alias and you thus wont cause 
conflicts. Hope that makes more sense.

> 
>> To others:
>>
>> Please go to http://dsource.org/projects/tango/ticket/548 and add your 
>> support for tango adopting this alias. This kind of issue is the main 
>> reason I want them to add it.
> 
> I seem to have already done that.  And filed a very similar bug to boot 
> that larsivi closed as a dup.  :-)

That's why I wrote 'To others' :)

> 
> --bb



More information about the Digitalmars-d mailing list