Re:Circle-Ellipse Problem
by cousin_it on Sunday April 17, 2011 @02:09PM
(#2456591)
English has no problems saying that a circle is an ellipse, though. Neither does math. I'd like my programming languages to be able to express math.
[ Parent
| on HN ]
"is like" is not in the vocabulary in many OO languages, and that's the rub. A circle is not (in a general, behavioral sense) an elipse and can't support all the operations an ellipse is expected to do.
As for asking for expressing math, things like CL's generic methods or Haskell's typeclasses model this sort of ad hoc series of relationships much more elegantly, in my opinion.
Haskell's typeclasses are still a few hacks away from perfection :-) See the last part of this document: http://www.haskell.org/tutorial/numbers.html