[Python-Dev] PEP 285: Adding a bool type

Gary Stephenson garys at ihug.com.au
Sun Mar 31 16:22:36 EST 2002


"phil hunt" <philh at comuno.freeserve.co.uk> wrote in message
news:slrnaacavs.2gs.philh at comuno.freeserve.co.uk...
> On 30 Mar 2002 11:04:13 -0500, Andrew Koenig <ark at research.att.com> wrote:
> >
> >I wonder if this is the circle-ellipse problem over again?
>
> What is the circle-ellipse problem?

One way of expressing the problem is that whilst you and I readily
understand that a rectangle with equal width and height is most definitely a
square, or that an ellipse with equal chords is in fact a circle,  our OO
type systems, in general, do not and cannot.

Date and Darwen discuss this issue extensively in their 3rd Manifesto tome
[1],   and they opine that a "real" OO type system should automatically
promote a "square rectangle" to an actual square instance (assuming of
course, that a "square" class has been defined as an heir of rectangle with
the appropriate constraint). They call this feature "Specialisation by
Constraint".

Personally, whilst I find their arguments most interesting and persuasive,
it would appear to my neophyte eye that actually implementing such a system
might prove even more problematic than trying to trying to satisfy all
twelve of Codd's rules at once! (which in turn has proven to be marginally
more difficult than lifting yourself up by your own bootlaces <g>).

cheers

gary

[1] -
http://www.amazon.com/exec/obidos/ASIN/0201709287/ref=pd_sim_books/002-59731
48-1843226







More information about the Python-list mailing list