0-1-Many Pattern
Hans-Martin Mosner
hm.mosner at cityweb.de
Wed Aug 26 17:58:47 UTC 1998
One easily overlooked problem with the 0-1-many pattern is that Strings
are Collections. So if you have a String, does it mean one string or
many characters?
VisualWorks has solved this problem in the dependency mechanism by
implementing #asDependentsCollection, #asDependentsDo:,
#asDependentsWith: and #asDependentsWithout: (if I remember correctly;
it's been quite some time since I looked at this).
These work with nil (for no element), instances of DependentsCollection
(for many) and anything else (for one).
I would like to see something like this but abstracted from the concrete
problem (dependency). The 'elements' naming convention would suit me
fine.
Hans-Martin
More information about the Squeak-dev
mailing list
|