Re: LSP Was: Mixing OO and DB
Date: Sat, 23 Feb 2008 16:50:49 +0100
Message-ID: <1q64vgx141fnh$.1lwlpewemurna.dlg_at_40tude.net>
On 23 Feb 2008 14:35:51 GMT, Stefan Ram wrote:
> Each circle is an eclipse, but each storage for eclipses is
> a storage for circles, while a storage for circles is not
> a storage for eclipses.
"Storage" is implied by out-substitutability. Circle is in-substitutable, but not out-substitutable for ellipses. Quite simple.
> All the discussions about this only stem from lack of care to
> distinguish between values and storages.
No. It is between in-/out- and other finer kinds substitutability. You can consider the set of ellipses which lengths are rational numbers as an example of a thing where circles aren't substitutable either in or out.
> The LSP is not needed to resolve this.
To resolve what? Out-circle is not an LSP subtype of out-ellipse. It cannot be resolved without altering the contracts, the contexts of use or both.
-- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.deReceived on Sat Feb 23 2008 - 16:50:49 CET