Author: Omid David Tabibi
Date: 15:18:41 07/28/03
Go up one level in this thread
On July 28, 2003 at 17:34:46, Russell Reagan wrote: >Is there any reason to start new projects with C anymore? It seems like most (if >not all) of the drawbacks of C++ have faded away with modern compilers. > >Note that I am talking about new projects, and maintaining old projects is >obviously a good reason to still use C. I always write C-style code in C++. So, practically I'm still programming in C, while I almost never use a .c file :) Writing C-style in C++ has a few advantages: stronger type checking, you don't have to list all the variables at the beginning of the function, you can use references in addition to pointers. C++ also gives you a built-in boolean type, but I think it is still better to use #typedef int BOOL, since the built-in "bool" type in C++ is usually implemented in one byte. However, there is still one use for pure C: when you are working in teams and speed is the important factor. In this case C-style coding in C++ won't be practical, since even if you do that, your teammate might still use costly C++ features. By forcing them to write in pure C, you force them to write efficiently.
This page took 0 seconds to execute
Last modified: Thu, 15 Apr 21 08:11:13 -0700
Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.