http://cousin-it.livejournal.com/ ([identity profile] cousin-it.livejournal.com) wrote in [personal profile] yigal_s 2004-06-04 03:00 am (UTC)

A funny analogy regarding real and complex numbers. If we're so OO, why don't we make integers a subclass of floats?

I guess the reasons are obvious. A subclass-superclass relationship isn't the same as subset-superset. Moreover, as Alex Stepanov (the designer of the STL) notes, even issues of function domain can't be handled by OO alone, we need generics.

Post a comment in response:

This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting