[Seaside] [OT] Case insensitive comparison not stable ?

Ramon Leon rleon at insario.com
Wed Jan 11 17:25:45 CET 2006

> But pay attention using subclassing instead of subtyping is 
> not really a good style.
> I have problem to see why authorRepository is a Set, sure it 
> can be implemented as a set...
> but it does not have the same interface than a set to my taste.
> Stef

I agree, you might find that later you need it to be a TreeSet or a
BTree in order to use with an object database, and your clients are
bound to the interface of Set preventing you from changing the
superclass.  So rather than using inheritance, use composition, have
your repository include a set as a member variable, to hide the
implementation, and simply delegate only those protocols a repository
needs to the internal collection, because you will need to change it

More information about the Seaside mailing list