home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!haven.umd.edu!darwin.sura.net!dtix!mimsy!alex
- From: alex@cs.umd.edu (Alex Blakemore)
- Newsgroups: comp.sys.next.programmer
- Subject: Re: The Darker Side of C++ (forwarded)
- Message-ID: <63366@mimsy.umd.edu>
- Date: 13 Jan 93 05:51:40 GMT
- References: <1993Jan12.165154.26915@dvorak.amd.com> <1iv5ijINN8ba@pith.uoregon.edu>
- Sender: news@mimsy.umd.edu
- Distribution: usa
- Organization: U of Maryland, Dept. of Computer Science, Coll. Pk., MD 20742
- Lines: 29
-
- In article <1iv5ijINN8ba@pith.uoregon.edu> bjorn@darmok.uoregon.edu (Bjorn S. Fjeld Pettersen) writes:
- > (BTW, where is that multiple inheritance in Obj-C???)
-
- and where is dynamic binding in C++?
-
- about MI, it is a technique, _a_ solution to a class of programming problems.
- same with delegation using dynamic binding in Obj-C.
-
- in C++, MI is critical because inheritance is the main tool in the langugage.
- in other languages, MI may not be as critical because other language features
- can be used to solve problems (perhaps more elegantly) for which C++ requires MI.
-
- for example, MI is often used to mix in functionality - there is a true parent class
- in an abstract sense and several other parents that just provide some methods.
- Delegation can play the same role in Obj-C, other languages may have other features
- that can achieve the same effect.
-
- classes that are really multiple things at the same time (both an airplane and a radio)
- really benefit from MI, its the most natural way to express that - but many people state
- that use of MI is rare compared to the others - and even then there are other ways
- (let each airplane _contain_ a radio).
-
- Bottom Line: MI can be very useful in some situations and languages, but that
- doesnt mean it should be added to every OO language. there may be other langage
- features that obviate much of the need for MI in that case. MI does bring some
- complications as well.
- --
- ---------------------------------------------------
- Alex Blakemore alex@cs.umd.edu NeXT mail accepted
-