hrh@well.UUCP (Harry Henderson) (08/22/89)
I've been learning (and enjoying) C++ for some time now. I can see the power of the language, but I feel frustrated at the prospect of having to reinvent the wheel in order to use object-oriented programming from the top all the way down. After all, on the PC (or even in UNIX) there are hundreds of C library functions for strings, numeric conversions, math, memory management, graphics objects, ports, process control, and more. With the C++ interpreters or compilers that I've seen, none of these functions are implemented in classes, so all you can do is plug them in as needed into your own class implementations. As far as I can tell no one has implemented the standard C library (let alone the extensions of Borland, Microsoft, and so on) in the form of classes, member functions, and operators. An example would be classes for static and dynamic strings with concatentation, indexing, comparison, and so forth. Instead of calling these functions as is done in regular C, I want to be able to call a member function or operator for a string class so a string can change its own case, search itself for a certain substring, etc. I'd like to be able to have memory objects that can dynamically allocate memory as needed, math objects that are able to perform arithmetic, and so on. Indeed for the Microsoft C compiler I would love to be able to define graphics objects that are intelligent, that can be cloned easily, that allow combining text with them easily, hiding the messy details. Some of these are pretty trivial to do (and *could* serve as textbook examples), but no one seems to have gone ahead and done a complete implementation. I'd like to ask readers of this newsgroup the following: 1) Do you know of any implementations of the standard C libary written in C++ as objects that I might have missed (especially for the PC)? 2) How important do you think such an object-oriented C library would be ? How useful to you? 3) How hard would it be to implement such a C++ library*? (Preferably in C rather than assembly language.) Perhaps some major corporations are burning the midnight implementation oil right now, if so I would like to hear about it. I am considering working with other authors to develop a book that presents such a library, at least in part. Thanks, Harry -- "Life, liberty, and the pursuit of happiness" The opinions expressed are my own, but you're welcome to share them. Harry Henderson (freelance technical editor/writer). {hplabs,pacbell,ucbvax,apple}!well!hrh
sarrett@ics.uci.edu (Wendy Sarrett) (08/22/89)
I've just started using c++ with the gnu compiler and it comes with a bunch of libraries which are implemented in many cases as classes. In particular, I've been using there statistical library which is implemented as a class. Wendy