Matt Todd
7/28/2006 7:18:00 PM
A simple way to describe it may be to look at it as a singleton object
in that, every unique symbol is a different object, but all of the
same symbols are the same object.
For instance...
x = Foo.new('bar')
y = Foo.new('bar')
z = Foo.new('baz')
Both x and y will be the same object, but different references. But z
will be different because its value is different. The only way I can
think of reproducing this in any other language is to create this
weird version of a Singleton class. Should we call it a
Unique-Singleton pattern?
M.T.