home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c++
- Path: sparky!uunet!mole-end!mat
- From: mat@mole-end.matawan.nj.us
- Subject: Re: Need help implementic data structures of generic objects
- Message-ID: <1992Dec13.141400.5307@mole-end.matawan.nj.us>
- Summary: New Lamps for Old, New Hacks for Old
- Organization: :
- References: <1992Dec8.165230.2587@ucc.su.OZ.AU> <42186@sdcc12.ucsd.edu> <1992Dec11.233253.27540@informix.com>
- Date: Sun, 13 Dec 1992 14:14:00 GMT
- Lines: 43
-
- In article <1992Dec11.233253.27540@informix.com>, cshaver@informix.com (Craig Shaver) writes:
- > In article <1992Dec10.114636.16861@ucc.su.OZ.AU> maxtal@extro.ucc.su.OZ.AU (John MAX Skaller) writes:
- > >In article <42186@sdcc12.ucsd.edu> cs161feu@sdcc10.ucsd.edu (Anthony Minkoff) writes:
- > >>Hi. Another question from a C++ neophyte.
- > ....
- > >>The approach that has been
- > >>suggested is:
-
- > >>class Object {
- > >> /* ...etc... */
- > >>};
-
- > > Dont do this Smalltalk hack please. A queue of Objects is
- > >totally useless, since they are just Objects and not ever Widgets.
-
- > YES! Do that elegant Smalltalk thing. Do not listen to C++ hacks and
- > bigots. Put a little thought into it and do something (re)useful.
-
- If you are programming in Smalltalk then by all means use the same
- language construct for inheritance as for genericity. But if you
- are programming in C++, use the right tool: a template.
-
- The template should describe the nature of a collection; the template
- should be instantiated for the type of the thing being collected.
- With the exception of collections of things to freeze and thaw and
- a few like problems, there are no truly heterogenous lists in problems.
- You are collecting objects because you are going to gurklemont them;
- then you have a list of gurklemont'ables, NOT a list of wholly anonymous
- Objects.
-
- When in Smalltalk, Talk Small. When in C++, think clearly and write
- clearly. True elegance means using a thing well as designed.
-
- ``We got elegance! If you ain't got elegance, you can never, ever,
- carry it off.'' --From ``Hello, Dolly''
-
- ``To use the language well, do not begin by hacking it to bits.''
- --Strunk and White
- --
- (This man's opinions are his own.)
- From mole-end Mark Terribile
-
- mat@mole-end.matawan.nj.us, Somewhere in Matawan, NJ
-