FRC Robot Programming

History of C/C++

The C language was developed in 1972 by Dennis Ritchie with the purpose of writing operating systems.

The primary goals of C where:

  • Be a minimalistic language, easy to compile with
  • Efficient access to memory (RAM)
  • Output efficient code
  • Be portable (no extensive runtime requirements)

C++ was developed by Bjarne Stroustrup at Bell Labs as an extension to C, starting in 1979.

The underlying design philosophy of C and C++ can be summed up as “trust the programmer” -- which is both wonderful, because the compiler will not stand in your way if you try to do something unorthodox that makes sense, but also dangerous, because the compiler will not stand in your way if you try to do something that could produce unexpected results. That is one of the primary reasons why knowing what you shouldn’t do in C/C++ is almost as important as knowing what you should do -- because there are quite a few pitfalls that new programmers are likely to fall into if caught unaware.

C++ adds many new features to the C language, and is perhaps best thought of as a superset of C, though this is not strictly true as C99 introduced a few features that do not exist in C++. C++’s claim to fame results primarily from the fact that it is an object-oriented language. As for what an object is and how it differs from traditional programming methods, well, we’ll cover that later.

References

"Introduction to C/C++." Learn C++. N.p., 27 May 2007. Web. 16 May 2015. http://www.learncpp.com/cpp-tutorial/03-introduction-to-cc/.