News for hackers. Stuff that matters.
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.
Re:Circle-Ellipse Problem by KirinDave on Sunday April 17, 2011 @04:03PM (#2456868)
"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.

Re:Circle-Ellipse Problem by cousin_it on Sunday April 17, 2011 @05:21PM (#2457060)
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
Re:Circle-Ellipse Problem by ataggart on Sunday April 17, 2011 @03:30PM (#2456784)
The rub comes when one tries to hang behaviour on the types.