| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: Circles and ellipses
"Bob Badour" <bbadour_at_golden.net> wrote in message news:cd3b3cf.0108220440.fbece3d_at_posting.google.com...
RM> This is the essential problem that the LSP (Liskov Substitution RM> Principle) tries to resolve; or at least identify.
>If one treats values and variables as the same thing, then LSP
>guarantees that no inheritance is valid unless every subtype is a
>superset of the values of the supertype, but we already know that a
>subtype is a subset of the values of the supertype. This would require
>equivalent sets of values for all types related in any way through
>inheritance.
Person = { name : string, age : 0-100 } ;
Employee : Person
{
salary: 0..N, payroll-id : string
}
Employee is a subtype of Person.
Employee properties are *not* a subset (not a proper one anyway) of
the supertype.
RM> This implies that the "naturalness" of the derivation is not RM> useful.
>I would argue that the lack of distinction between values and
>variables reduces utility -- not the naturalness of the derivation.
>The utility impairment should be a clue that the lack of such
>distinction is harmful.
Plenty of truth in that.
Regards,
Steven Perryman
Received on Thu Aug 23 2001 - 04:38:56 CDT
![]() |
![]() |