|
Re: C or C++
I think most of us would agree that we would rather have the flexibility and added features of C++, particularly object oriented-ness.
The problem with C++ is that along with its added features comes added bloat and inefficiency. Unless the architecture and processing power were SUBSTANTIALLY and unnecessarily upgraded, all of the people who keep complaining that C is primitive would be complaining that their code wouldn't run if we upgraded to C++. Memory allocation/deallocation is no small task, especially when handled in software. C++ is good for PCs where functionality is a greater priority over efficiency and there is an abundance of computational power, but not so great for our application. In industry, C is not considered outdated, it is the standard in the world of embedded programming and for good reason. C is sleek and slim.
Heated seats, radios and air conditioning are good to have but race cars don't have them and do just fine without them. Our robots, like race cars are designed minimalistically. There is nothing on a FIRST robot that is not absolutely necessary and that goes for code too.
Any problem that can be solved in C++ can be solved in C. The solution may not be as coder friendly, but chances are it will be smaller and take fewer processor cycles to execute.
__________________
1139 Alumni
Last edited by Rickertsen2 : 14-11-2006 at 21:02.
|