What is a programming language?
A programming language is a system of notation that allows a user to write computer programs. These languages are build to let humans communicate to machines a series of instrutction that are executed by the machine itself.
There are many different programming languages, each differentiating from the others for their syntax, semantics and approaches.
Some examples of programming languages are C, Java, Rust, Python and many other more1.
C++
Bitcoin Core, Bitcoin most famous implemention, is mainly developed in C++ (C-plus-plus). What’s that? No, it is not a droid from the Star Wars saga, but it’s a general purpose programming language created in 19852. It was conceived as an extension of C, by including the object-oriented programming (OOP) approach3.
Since v22.0, Bitcoin Core has upgraded to the C++17 standard, allowing core developers to take advantage of many new features that were not available in previous versions.
C++ characteristics
Here are some of C++ characteristics
OOP: based on the concept of objects, custom-made data structures that contains data, called attributes, and functions that allow to manipulate these data, called methods.
Type-based: when variables are declare their type must be always specified:
int var;
In this example, a variable
var
is declared as being of typeint
, which means an integer number.For resource-costrained software: C++ was designed with performances and efficiency in mind, since it is also used in embedded systems4, which usually have strict memory and time constraints. Perfect language for a full node, don’t you think?
“All C++ and no play make Jack a dull boy”, so enough for today!
In the next lessons we will start dividing in the deep waters of C++, and before you notice we will be exploring the Bitcoin code!
See you soon!
Nice!! Keep it going.