home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!charon.amdahl.com!pacbell.com!pacbell!oracle!pyramid!infmx!cshaver
- From: cshaver@informix.com (Craig Shaver)
- Newsgroups: comp.lang.c++
- Subject: Re: Should I use a generic object which all others inherit from
- Message-ID: <1992Nov17.190821.18348@informix.com>
- Date: 17 Nov 92 19:08:21 GMT
- References: <3762@news.cerf.net>
- Sender: news@informix.com (Usenet News)
- Organization: Informix Software, Inc.
- Lines: 37
-
- In article <3762@news.cerf.net> hlf@nic.cerf.net (Howard Ferguson) writes:
- >I am working on the early stages of design on an embedded C++
- >project. One of the decisions which we will have to make in the
- >near future is whether to make all of the objects inherit from
- >onie generic object at the top of the tree or to go for the forest
- >approach.
- >
- .................
- >
- >
- > Many thanks,
- > hlf
-
- An embedded system! C++!? JUST USE C!!!!
-
- UNLESS ....
-
- You have some of the benefits of OOP in mind, such as inheritance, reuse,
- and information hiding. Then if you are willing to take small dings in
- performance go all the way and use the tree approach as pioneered by
- Smalltalk. I recently saw a review of the toy code that comes with the
- borland compiler. The article's author commented that the tree type
- libraries were "passe" because of templates. What a stupid thing to say!
-
- One of the big wins of OOP is reuse. By using an inheritance structure
- you can reuse existing code and do incremental development. Related and
- unrelated classes can be used in the same context where a similar protocol
- is enforced.
-
- I have to think some of the people involved with C++ have no idea what the
- basis of OOP really is. They are simply using C++ as an improved C.
-
- Craig ...
-
- --
- Craig Shaver (cshaver@informix.com for now) (415)390-0654 (415)926-6407
- Productivity Group POB 60458 Sunnyvale, CA 94088
-