There is a question that occurs often at interviews and in real life: “Why do we need the virtual destructor?” In a very reliable source of knowledge (that is, on the Internet), almost everywhere ...
📚 Book review: "Language Implementation Patterns" (2010)
Link to The Pragmatic Bookshelf. After attending standard so-called “compiler” courses at the university (“formal languages and grammars” and “construction of compilers”), I saw that they were w...
Improving C++ compilation speed
The very recurring topic of “speeding up compilation” is a special fun activity in which many C++ developers who do not like slow compilation took part. I will list the main directions of this acti...
📚 Book review: "Team Geek" (2014)
Link to Amazon. This book was given to me as a gift in the Google’s San Francisco office 5.5 years ago. I haven’t touch it all this time until recently. But this is fine - I would not understand...
Simple "switch" for strings 🎲
C++ can’t have strings (or string literals) in switch-expressions as case values. There can only be constant integral values or enum values (an enum itself is an integer type secretly). Such a st...
clang-format: an architectural failure? 🩼
I wrote something about clang-tidy in this blog previously. It is used to check the code quality. It has a modular architecture - everyone can write their own check and use many checks independentl...
Thin client for C++ developers (with screenshots!)
I haven’t posted anything in the blog for a while, but now I have moved, got a WiFi, so I decided to write a post related to thin clients 😎 Year by year the size of big projects grows up, and it b...
The Holy C language review (for TempleOS) ✝️
TempleOS is an operating system that Terry Davis had been developing for many years alone. The development began after a psychiatric hospitalization, during which Terry was diagnosed with schizophr...
std::unreachable - safe shooting yourself in the foot 🔫
They standardized std::unreachable in C++23. The function has a wacky description: invokes undefined behavior (Prior to C++23 you can use __builtin_unreachable on Linux) There are cases when ...
Coroutines for dummies (like me)
When I tried to understand how the coroutines (added to C++20) work, I discovered a very small number of understandable explanations on the Internet. In most explanations, the authors begin to rem...