Hi all -- let me fan the flames a bit on this topic and point out a very interesting paper on the subject of OO programming by Les Hatton. The title is "Does OO Synch with How We Think?", IEEE Software, May/June 1998. Basically, the conclusion the author comes to and provides evidence for is that object-oriented programming results in more coding errors and each error takes long to fix. The reason he provides is that object- oriented programming requires much greater dependence on the developer's long term memory (human memory and NOT RAM :-)) which ultimate lead to more errors and by extension they are going to take longer to fix.
Now, I caveat the above with that Les' study was done before the wide use of the Standard Template Library (STL). In fact, STL was not used in C vs. C++ comparison study. When deciding to go with C++ (vs C), the author recommends you determine if you get a high degree of code reuse ( GUI development has benefited greatly from this). Otherwise, go with C. Enjoy, Chris -------------------------------------------------------------------- Christopher D. Carothers Assistant Professor Department of Computer Science Rensselaer Polytechnic Institute 110 8th Street Troy, New York 12180-3590 e-mail: [EMAIL PROTECTED] web page: www.cs.rpi.edu/~chrisc phone: (518) 276-2930 fax: (518) 276-4033 -------------------------------------------------------------------- On Wed, 13 Mar 2002, Calin A. Culianu wrote: > On Tue, 19 Feb 2002, Ken Emmons, Jr. wrote: > > > Hi Adam, > > I am using both C and C++ in my project. I think that > hte reason why more people don't use C++ is that it is a pain in the > butt to get working. Also, C++ is a lot more liberal about things like > using malloc and free when doing object declaration in functions, etc. > And malloc and RT don't really mix too well. With RTlinux you > basically have to either do kmalloc in the init_module() or write your > own memory heap allocator. Basically you use static objects for RT. > Also, C++ is pretty strict, so when writing things like IO drivers, > you have to cast the heck out of your data in order to read and write > memory and the like. I am only using C++ because of the pass by > reference operator, which I use in my API to pass a reference to and > IO variable that the function will operate on. I may use objects in > future api's but they are all functions now. I think the Real time > programing paradigm makes it more difficult to use higher level tools > such as OOP jsut because you need to be more ! aw! > are of what is > going on at a hardware level. > > Hey regarding your using C++ solely for the reference type.. why not just > stick to C and use pointers instead? > > -Calin > > > -- [rtl] --- > To unsubscribe: > echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR > echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED] > -- > For more information on Real-Time Linux see: > http://www.rtlinux.org/ > > -- [rtl] --- To unsubscribe: echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED] -- For more information on Real-Time Linux see: http://www.rtlinux.org/