Re: protocols, inheritance and polymorphism

From: Donn Cave (donn_at_u.washington.edu)
Date: 11/24/04


Date: Wed, 24 Nov 2004 09:24:22 -0800

In article <s4qdnUDCJoJ9vjncRVn-hA@rogers.com>,
 "Dan Perl" <danperl@rogers.com> wrote
...
> It's hard to argue against Smalltalk. I haven't used it for many years so I
> don't remember it but it was THE language of choice for an OOP course I took
> oh so many years ago. And I still see it mentioned as a model for OOP. I
> never learned Objective C so I cannot argue with that either.
> Unfortunately, as much as I am learning to like Python, I don't think I see
> it as a picture perfect OOP language. It may be a controversial opinion but
> I am not at all satisfied with encapsulation in Python (you cannot hide any
> of a class's implementation).

> Can you elaborate on problems that static languages have with OOP? We have
> been touching on parametric polymorphism and that is a valid point. I also
> see multiple inheritance as being very poorly implemented in C++ and Java to
> the point where books on C++ that treat the subject discourage you from
> using it and Java has effectively designed it out of the language (you can
> implement many interfaces but you can extend only one class). What do you
> have in mind?

I am really too unschooled in these matters to pursue that.
I have mentioned Haskell a couple of times, and that's my
perspective on static typing. I recommend it as an interesting
exercise: learn Haskell, find out what static typing is about.
It isn't perfect, but it's leagues ahead of C++ etc.

I don't have any beef with multiple inheritance, in fact the
notion of "mix-in" classes might have some potential to be the
basis for a more sound approach to OO.

   Donn Cave, donn@u.washington.edu



Relevant Pages

  • Re: OO and Extending (Was: Is Procedural Paradigm a basis of OO Paradigm?)
    ... That greatly depends on the language. ... You have to *show* OOP being better, not merely claim you are smart ... I find at least two problems with OO's approach to "extension without ... It works for systems programming, ...
    (comp.object)
  • Re: why still use C?
    ... >> learn and work with with the C language, ... > - some people don't want to learn OOP ... can be used with many other programming styles. ... >> have caused him to associate your nonfluency with English ...
    (comp.lang.c)
  • Re: A new paradigm
    ... OOP being described in OOP language instead of in English. ... Many of us in the MV environment are business people who know what we are ...
    (comp.databases.pick)
  • Re: Association vs Dependency
    ... >>the specific language. ... it is actually subverting the prerogatives of OOP. ... problems with physical coupling that procedural 3GLs. ... dependencies through the header file definitions. ...
    (comp.object)
  • Re: OOP leads to lousy websites?
    ... > There has been a number of threads in this newsgroup concerning OOP ... OOP is really (in any language, although some give you no alternatives) just ... the actual programming is done with only a very small ... Imagine that there is *no* functions in PHP. ...
    (comp.lang.php)