sorry, but these arguments sound masochistic to me. And the mentioned
gtk+ is a perfectly good example to not code an OO toolkit in C. awfully
long function names, no namespaces, casts all over the place. i think
the only valid reason, gtk is done in C, is that at the time it was
started, C++ wasn’t that mature and portable. where is the point in
coding OO, using a language that does not support it, when on the other
hand, there is an OO counterpart of that language?
One can write C code in an OO maner. One does not have to use a
language that enforces OO (or supports, depending on your point of
view) to get many of the benefits of OO. C does everything need to do.
I do not see any advantage in dealing with the extra complexity of C++
if I do not need to.
Roger Sessions’ Class Construction in C and C++: Object-Oriented
was influential to my prrogramming style. Roger teaches about OO using
plain C in the start of the book, and then discusses the limitations
of C when doing this, and how C++ overcomes these limitations. In my
case though, I never run into the limitatins that he describes, and I
find the simplicity of using plain C trumps any advantage I would get
using C++, even for OO programming.
p.s.: hopefully not starting a flamewar here.
Not by me. C++ is fine for anyone who wants to use it. I just have
seen no advantage to it for me. Well other than C++ comments. I love
C++ comments ( // ) over C comments ( /* … *./) .
I have an example of my OO style on the gameprogrammer wiki at:
Feel free to critique. I am always open to learning new things,
although this discussion more properly belongs on the gameprogrammer
ChrisOn 12/24/05, Clemens Kirchgatterer <clemens at 1541.org> wrote: