#cxx
Programming in C++.
A lot of people don’t like C++, and I can’t blame them for it. I don’t love it too.
It’s just that it’s currently the most pragmatic choice for any sort of multi-domain program which follows the Philosophy.
While most C++ code I write is very C-like, I don’t limit myself to C, because C++ is a lot more pleasant to program in.
Just the addition of namespaces, enum class
, references, parsimonious use of templates, and operator overloading, is enough of an improvement over C that I generally tend to prefer C++ for solving my problems.
C++ remains the most pragmatic choice for most long-term projects while Odin and Zig are still cooking. I can rely on the language not changing under my feet, remaining stable and portable for many years to come, with a library ecosystem following a similar philosophy.
Places of unpleasantness in C++ for me include: classes and encapsulation, complicated template metaprogramming, the entire std
namespace, lack of enum-indexed arrays, and also the Unreal Engine.
…Seriously though, why does nobody but Odin and Nim implement enum-indexed arrays?
What is wrong with you people.