Re: Newbie OOP question

From: David White (no_at_email.provided)
Date: 05/02/04


Date: Sun, 2 May 2004 08:34:40 +1000


"Jerry Coffin" <jcoffin@taeus.com> wrote in message
news:b2e4b04.0404300644.559f70e7@posting.google.com...
> "David White" <no@email.provided> wrote in message
news:<U2okc.11208$KS1.307586@nasal.pacific.net.au>...
>
> [ ... ]
>
> > BTW, although MS and Borland are hardly anyone's idea of OOP authorities
(I
> > once came across a class BookArray, derived from both Book and Array, as
an
> > example of multiple inheritance in an MS tutorial),
>
> This is an example, not of incompetence, but of a mixin. I'm not
> particularly an advocate of mixins myself, but I don't think it's at
> all reasonable to dismiss them as simple incompetence.

I doubt this. My recollection is that the tutorial was a sort of beginners'
guide, and it gave a simple hierarchy diagram with no details to illustrate
multiple inheritance. As defined, an instance of BookArray would be both a
Book and an Array. It wouldn't be an array of books, as the name implies.

DW



Relevant Pages

  • Re: Newbie OOP question
    ... >> This is an example, not of incompetence, but of a mixin. ... > Book and an Array. ... name of the poem is, what the poem is called, and what the poem is. ...
    (alt.comp.lang.learn.c-cpp)
  • Duck Typed Concepts for Ruby (was Re: A use case for an ordered hash)
    ... An Sequencable mixin can be defined that implements all sorts of operations such as append, concat, splice, sort, etc. ... extending an instance of Array with Sorted if the array is known to be sorted. ... Now returning to the thread at hand we can see that the difference between the associative array and hash hierarchies is that the hash hierarchy depends upon Hashable keys. ...
    (comp.lang.ruby)
  • Re: Inheritance
    ... Thus, Circles, and Rectangles are kinds of shapes and Squares are kinds of Rectangles. ... Most people try to stay away from multiple inheritance mostly because it can get you into a lot of trouble, but also because it's kind of confusing. ... where I want my COrderQueue class to be a thread (have the functionality of CWinThread), but also have the functionality of a listener. ... you would not want to do anything with any kind of array besides store a single kind of object. ...
    (microsoft.public.vc.mfc)
  • Mixins, traits and horizontal composition
    ... Which, in turn, is a more well defined and implemented Ruby mixin. ... If traits were an array of horizontal ... array append: ... Predicate classes and the state pattern (UnrealScript states is a good ...
    (comp.lang.misc)
  • Re: Random select
    ... I would have and array and the script would pick one of ... Check boilerplate spelling -- error is a public sign of incompetence. ...
    (comp.lang.javascript)