#1 Where to start
I will begin by reviewing the setup I use to program. I am not going to be using an IDE to start this project as I want to explore the use of the language without all of the complexities that come with an IDE.
What is C++ today?
There are multiple types/versions of C++ out there. For example C++ 11, C++ 14, C++ 17, C++ 20 and C++23. I will be looking at C++ 23 as that is the latest version at the time I am starting this blog.
Think about any genre of program out there today, database, media player, game, … and it is most likely written in part in the C++ language. This is in part base on how close the language is to the bare metal only outdone by assembly.
So what is a programming language?
The goal of a programming language is to get a file that can be run by the processor at the machine code level. We look at the programming language as a tool that can convert what we think and speak into something that the processor can understand. I have spent 20+ years in the IT industry and I can say that understanding how the processor actually works has really changed how I look at problems and how to solve them with programs.
What makes up C++?
The core of C++ is the complier. The job of the compiler is to take what we have written and convert it to the machine code. In this way every program no matter where or what language it was written in will end up as machine code. This means that if you have the compiler you have the entire language.
While every high-level language needs a compiler (or interpreter) to convert code to machine instructions, each language has its own specific syntax and rules that the compiler must handle.
Core Components:
- Syntax: The set of rules that defines the combinations of symbols that are considered to be correctly structured programs in that language.
- Semantics: The meaning associated with syntactically correct strings of symbols within the language. It’s what the code actually does when executed.
- Compiler/Interpreter: These tools translate high-level code into machine code (compiler) or execute the code line-by-line (interpreter).
Standard Library vs. Core Language:
- Core Language: The fundamental elements (syntax and semantics) provided by the language itself.
- Standard Library: A set of pre-written functions and classes that provide convenient, reusable code. They are incredibly useful but not part of the language’s core. For instance, in C++, the standard library includes containers, algorithms, and input/output functionalities.