restructuring name hiding around the notion of hijacking
Andrei Alexandrescu
SeeWebsiteForEmail at erdani.org
Fri Oct 2 06:25:40 PDT 2009
Michel Fortin wrote:
> If I could attach my class-related data to the ClassInfo of a specific
> class (so it could be retrieved at runtime) and if static functions had
> access to the classinfo of the class they're called from (practically
> making them member function of the corresponding ClassInfo) the
> situation might be different though, and much less code would be needed.
It has crossed my mind more than once to put an Object userdata[string]
member somewhere in TypeInfo or Classinfo (in fact the two will be soon
merged). That way client code would be able to plant their own arbitrary
data on a per-class basis.
Andrei
More information about the Digitalmars-d
mailing list