How about making class names and class identifiers separate?

Ned Konz ned at bike-nomad.com
Sat Apr 10 00:38:26 UTC 2004


On Friday 09 April 2004 1:10 am, Craig Latta wrote:
>         So. Once you have UUIDs available for identifying classes, instead
> of textual class names, having multiple distinct classes with the same name
> is no problem. You don't need to overload the "name" instance variable
> (defined by Class) with namespace names. Instead, just make namespaces be
> simple collections of class identifiers (UUIDs). Nest the namespaces if you
> want, or not. :)  Give namespaces names and UUIDs too.

And then it would be a tool issue if both I and Avi (say) started writing the 
definition of a class with the same name and later wanted to merge our work 
(since the UUIDs would be different, as well as their mapping to names).

Actually, it would make sense to give *every* object (that is, every object 
whose identity matters) a UUID if it is going to have a life outside an image 
(via exported/saved files, over the network, in a database, etc.).

Otherwise, sharing changes to the same object is tricky. As it is now, in 
Connectors I file out drawings using a SmartReferenceStream and when I file 
them back in I've lost the object identity. So I can't file out a drawing, 
let someone else edit it, and then file in their changes (at least not 
without unique identifiers of some sort).

-- 
Ned Konz
http://bike-nomad.com
GPG key ID: BEEA7EFE



More information about the Squeak-dev mailing list