Newsgroups: comp.lang.c++ Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!think.com!snorkelwacker.mit.edu!bloom-picayune.mit.edu!ahodgson From: ahodgson@athena.mit.edu (Antony Hodgson) Subject: Re: Questions about class libraries and TC++ Message-ID: <1991Mar19.231004.3749@athena.mit.edu> Keywords: turbo c++ class Sender: news@athena.mit.edu (News system) Organization: Massachusetts Institute of Technology References: <1991Mar18.230519.10695@noose.ecn.purdue.edu> Date: Tue, 19 Mar 91 23:10:04 GMT Lines: 33 In article <1991Mar18.230519.10695@noose.ecn.purdue.edu> psmith@iies.ecn.purdue.edu (Paul F Smith) writes: > >1. Should my class libraries be based on the Turbo C++ class library to >minimize reinventing the wheel? Or should I just use the Turbo C++ library >as a model and make mine work without it? > >3. Are the Turbo C++ libraries any good, anyway? Or are they just good >examples? There are several things I don't like about the Turbo libraries. For one, they decided not to overload operators to implement things like comparison functions (e.g., isEqual() instead of ==, isLessThan instead of <, etc.). They also seem to involve an awfully large amount of baggage which I find I rarely need. I've written my own list class from scratch and didn't endow it with the ability to discover its own type (for example), but that hasn't limited its usefulness at all. The idea that everything should descend from a common Object class at the top of the hierarchy is more appropriate to SmallTalk than C++; trying to enforce this practise makes it very difficult to create classes which are easy to learn. I would advocate fairly minimal classes and allow others to derive classes with broader functionality if that's needed (that's what multiple inheritance is for, right?). > >5. Is it possible to create a library that can be distributed and used >without requiring the source code to use it and/or derive classes from it? >(Or should I just count on including the source?) Definitely, that's the whole point of inheritance. Users, however, will generally be pretty upset if you don't make source code available. > Tony Hodgson ahodgson@hstbme.mit.edu