Seeing these gives me no desire to use c++. Most of the challenges are 10-20 lines in Python. Meanwhile the c++ code starts with "first let's define an implementation for a tuple, it's constructor, comparison operator, and make it hashable". Yikes.
Indeed, simple things are not that easy to do in C++ because there are always these small one-time costs that you have to pay. But you pay them only once, so C++ becomes a lot better than any other language on more substantial projects.
However, it's getting better, and there are nuggets like this:
This really goes back to the core failure of C++. C++ cannot have sane defaults, because it has to be backwards compatible. And basically, all choices made in the past are stupid by default.
I have this idea in my head, that I would really love to execute on at some point and that is to have a dialect or a fork of C++ that has sane defaults but is binary compatible with standard C++.
31
u/Ecclestoned Dec 15 '21
Seeing these gives me no desire to use c++. Most of the challenges are 10-20 lines in Python. Meanwhile the c++ code starts with "first let's define an implementation for a tuple, it's constructor, comparison operator, and make it hashable". Yikes.