My First Look At C++

Having completed my 15 week Software Engineering course at Flatiron School, I swiftly became aware of how much there is for me to learn as I continue my path as a software engineer. I wanted to learn something a bit different from what I was taught at Flatiron, and C++ appealed to me, after focusing on interpreted languages such as Ruby and JavaScript.
C++ Origins
C++ was created to add Object Oriented Programming to C. As such it was originally called C with Classes, and was renamed to C++ in 1983. In 1985 C++’s creator, Danish computer scientist Bjarne Stroustrup, published his reference to the language, The C++ Programming Language. However, it wasn’t until 1998 that the first international standard, The Annotated C++ Reference Manual, informally dubbed C++98.
Features
C++ is a compiled language. In lay terms, this means that the code a programmer writes has to be passed through a compiler, which translates it to machine language. Machine language is the language your computer, specifically your CPU, can understand. Unlike an interpreted language, which is translated into machine language through an interpreter at run time. This means a program in C++ will run faster as it is already in machine language and can just be executed without having each line deciphered first. A trade off being the time it takes for the code to be compiled before testing. It is worth noting that compilers, or interpreters can be made for any language as they are essentially just two different kinds of programs that translate the code into machine language, however it isn’t common for C++ to be interpreted.
C++ supports a number of paradigms. Paradigms are essentially a method of programming. Some languages are built with a certain paradigm in mind, C++ for instance was built with Object Oriented Programming in mind, however over time it was expanded to be a multi-paradigm language. Programmers can choose which paradigm meets their needs, and even use a mixed approach. Some paradigms supported are Object Oriented Programming, Procedural Programming, and Generic Programming. If you want to learn more about different programming paradigms I recommend checking this out.
As of C++11, C++ supports both manifest and inferred typing. Manifest typing is where the programmer has to declare the type of each variable, whereas in inferred typing the type is determined by the assigned expression. For example:
// manifest typing
int one = 1;
string hello = "hello";// inferred typing
auto one = 1;
auto hello = "hello";
In both cases, the type of the variable one
would be an integer, and the type of hello
would be a string.
C++ has great library support. A programming library is a collection of functions written by other programmers that you can include in your program. This is an excellent Medium article about programming libraries, including excellent detail and descriptions of the different types of libraries.
Being based off of C, which is a procedural language, C++ allows low level manipulation and memory management. This is part of why C++ is one of the fastest programming languages.
What is C++ Used For?
Operating Systems! Windows and Mac OS both utilize C++. It is used to create many things because it is “close to the hardware” (referring again to that low level manipulation), for example: Cloud/Distributed Systems, Embedded Systems, and Compilers. For it’s speed, C++ is used in Game Development, Web Browsers, and Graphics Processing.
My Take Away
I’m excited to learn more about C++ and to start using it to code something. I’ve heard C++ can be hard for beginners to learn, because it’s syntax is less intuitive and it can quickly become overly complex, as well as not being able to deploy something as quickly as in, say Ruby. Overall I’m glad to be expanding my coding tool kit.