|
RE: [OT] Case insensitive comparison not stable ?: msg#00144lang.smalltalk.squeak.seaside
> 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 later. |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: [OT] Case insensitive comparison not stable ?: 00144, stephane ducasse |
|---|---|
| Next by Date: | Re: [OT] Case insensitive comparison not stable ?: 00144, Francois Beausoleil |
| Previous by Thread: | Re: [OT] Case insensitive comparison not stable ?i: 00144, stephane ducasse |
| Next by Thread: | Re: [OT] Case insensitive comparison not stable ?: 00144, Francois Beausoleil |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |