Ask HN: Do you still enjoy coding in C++?
67 pointsIn the recent years C++ received a lot of backlash due to its complexity and (perceived) feature creep. However, since C++11 I really enjoyed writing C++ with its strict type system (including const), range-based for loops, smart pointers, and how much you can do with templates. On the other hand, I know that it can be very tricky to write, for instance, a correct iterator, to get handling of rvalue references right, or to read error messages that involve templates.
So, do you enjoy or dislike writing C++ source code and why?
Comments (93) 66 threads
Earlier commentspython just introduced built-in sentinel, and only comment on an explainer video brought up that it's nothing new and is just a rename of unittest.mock.sentinel
who even knew there's unittest module? who even knew there's unittest.mock? definitely not me
because it doesn't matter - you use what you need and learn what you encounter. Same thing with C++
do you still enjoy speaking english?
Python isn't immune from those either by the way (e.g. walrus operator, pattern matching) but nowhere near C++ level.
It has also been in there since Python 2.1, as far as I can tell [1], though the mock module is somewhat newer [2], but still quite old at this point. In all that time, have you never skimmed through the list of modules in the standard library? I'd recommend doing so once in a while, since a lot of the stuff in there is quite useful: https://docs.python.org/3/library/
[1] https://docs.python.org/2/library/unittest.html [2] https://docs.python.org/3/library/unittest.mock.html
All comments shown.
Couldn't load more comments. Check your connection and try again.