C++Craft is a depth-first C++ course for people who prefer understanding “why?” over blindly learning rules. It sets out to rebuild the language from its bare metal so as to present the soundness of its logical construction, offering mental models that explain its difficulties rationally.
The course
If we define the success of a C++ course by how quickly its students become able to write functional C++ code, the focus is on providing the shortest path to delivery. Although it is a perfectly valid approach, C++Craft does something radically different.
C++Craft aims at empowering its readers with the tools to understand the basics of the language deeply. Instead of attempting to cover a lot of ground quickly, it builds the language from its most elementary pieces, and defines its success by how little is left unexplained.
Instead of handing you as many keys as possible to unlock the quickest path to producing code, it invites you to earn them, one at a time. Instead of telling you how to avoid a difficulty, it guides you through solving its puzzle so that you become able to choose how to deal with it. The dark corners of the language often disappear when they are illuminated by the principles, mechanisms, and compromises of the underlying problem.
By the time you write your first function in this course, you will know what a function actually is, what happens when it is called, and why. That understanding is the point.
This is not a typical C++ course.
It will not give you working code in the first ten minutes.
It will give you a clear understanding of what that code actually
does.
Which takes longer.
At first.
It is built on the conviction that excellence comes from solid
basics.
Depth rather than breadth.
C++Craft is meant to be a humble stepping stone on your road to mastering C++. Nothing more, nothing less.
Who it is for
- Complete beginners who want to understand programming, not just make it work.
- Programmers from other languages (especially Python, C#, Java, web) who want to understand how C++ is different.
- Intermediate C++ programmers whose foundations feel shaky and want to rebuild them more solidly.
If you are looking for quick results, project-oriented courses, recipes,
tutorials, or working code to copy, this is not the right place.
Give it a try, but don't insist too much if it's not for you.
Or use C++Craft to complement more hands-on content, alternating
according to your preference.
learncpp.com
is excellent and more geared towards code production.
Bookmark C++Craft if you
want, and come back when you are ready to go deeper.
Functional models
C++ has been designed to adapt to many different architectures, which may come in all shapes and forms. For this reason, C++ assumptions are usually minimal (a Byte might have any number of bits ≥ 8, floating point might not follow IEEE-754, word and int size can be pretty much anything…), and indeed, exotic architectures exercising such variations do exist. This extends to hardware architecture and Operating System behaviour (CPU cache, memory models, etc.).
However, our purpose is to build a functional understanding of the language, and detailing these variations would be a major distraction from our goal. For that reason, this course uses functional models and deliberately simplifies possible hardware architecture variations to a robust general case, sufficient to explain the language's design.
We will acknowledge the variations, but then set them aside and proceed assuming the common case for the context of this course. It is up to readers developing on unusual hardware architectures to keep in mind the specifics that apply to their platform of choice.
This course is a C++ course, and hardware considerations come into it to support the understanding of the language we study.
Box guide
Lessons use colour-coded boxes to signal the register of what is being said. Think of them as tone or gesturing, independent of the content.
Any box can be collapsible. Boxes that are collapsed by default are optional depth; the lesson works without opening them. Don't hesitate to leave them be, you can always return later.
Questions & support
Found an error or imprecision? Open a GitHub issue. Corrections are welcome and help future readers.
Have a question about the content? Send an email.