CompuServe Messages

#Which C++ version?

    19-Aug-93 13:15:16
Fm: Steve Bennett/SYSOP 76702,1071
To: Greg Comeau@Comeau Cmptg 72331,3421
Well, to each their own… <grin> I won't argue about the merits of C vs C++, but I will make a general programming comment: It is possible to code in ANY language in such a fashion that the code is clear, efficient, relatively easy to debug and maintain, and can be picked up and understood by anyone who understands the language it is written in. It simply takes the correct attitude and a willingness to spend the time to do the job right. Even FORTH code (my favorite example…) can be written in such a manner. On the other side, it is equally possible to code in ANY language so that it is totally unclear, highly inefficient, impossible to debug or maintain, and anyone trying to pick up the code and understand it would be better advised to rewrite it from scratch. ANY language. No exceptions. Some languages make it more difficult to do it that way, but anyone determined to write bad code will find a way, by accident or purpose… Again, it's a matter of additude. C++ does a very good job of guiding programmers into writing better code. My biggest problems with it are more personal irritations rather than flaws in the language. (For example, I happen to be one of those old C nuts who seriously prefer the old style function declarations, although seperate prototypes are nice…) I'll probably end up switching over to C++ in time, and may even get to the point where I prefer it over C. I already code most of my C code in such a fashion that switching to C++ would be a fairly trivial change. But for now, C is good enough for what I need to do.