Newbie: The C / C++ Issue
leisner at rochester.rr.com
Wed Nov 12 22:46:19 PST 2003
My take on computer science (which is an oxymoron) is this:
Researchers look at successful programmers and try to figure out
what they're doing.
In the 70s, it was "structured programming".
In the late 80s it was "object oriented".
You can manipulate the data with a struct -- put in function pointers
to methods -- which is a crude way to do polymorphism.
Don't forget -- cfront translated C++ into C code...
OO doesn't promote reuse -- good design promotes reuse. I've been
reusing code for years. I'm like Will Tracz -- a used program salesman ;-)
I've reused a lot of procedural code.
One of my coworkers took a C++ course, renamed her "structs" to "classes"
and thought she was doing object-oriented stuff...please...!!
The bottom line is can other people understand your program.
What I've seen is you have far less of a chance in C++ than in C.
I've recently read Stroustrup's book and got more involved in C++ --
it seems the principle of least surprise was thrown out the window.
More information about the freebsd-questions