C++

Recently, a C++ committee meeting happened in Wroclaw. The safety study group (SG23) spent almost three days processing papers, and in this discussion, The growing interest in C++ safety is caused by the frequent classification of C++ among memory-unsafe programming language, as expressed in multiple official documents from different US agencies,,. The latter, in particular, …

Continue reading Safer C++ or Safest C++?

Also available in Italian On Twitter recently someone posted this picture: Ok, that’s C#, but we can (and will, in a few lines) rewrite it in C++. In the twitter responses, many people made fun of the code, or complained that the function is full of magic numbers, some others that it’s too long (implying …

Continue reading 10 Balls

This post is also available in Italian. Recently I did a batch of interviews for three positions in my team, and part of my standard interview is a coding question. I tend to focus on problems that will take at most 50% of the time I have, so the ideal question for me is apparently easy, …

Continue reading The Coding Interview

I begun to write this two years ago at the beginning of the pandemic, but then forgot to read, and hit publish. I think today is a good day to update, clean up, and publish. You might not be stranded at home anymore, but I think most of the things I wrote are still valid, …

Continue reading On studying C++

Updated on 2019/07/03 (long overdue) after this thread on reddit. My post from last week contained a HUGE bug: optionals don’t move their content lose their value on move, so destructor on moved handles is still invoked (thus causing multiple destructions). In the brief discussion on reddit, I proposed to create a optional with move …

Continue reading Moveable optional, really?