3 ms·
My opinion is similar to others in this thread. The complexity you are required to manage in order to push the limits of C++ makes doing so not worth it. Ther
by nocman 4y ago
My opinion is similar to others in this thread. The complexity you are required to manage in order to push the limits of C++ makes doing so not worth it. There are far too many ways it can bite you, and the benefits you gain by moving beyond a small subset of C++'s capabilities were not worth the hassle for me.
I really wanted them to be worth it, and spent years trying to make it worth it. I guess in the long run it was worth the time spent, because it caused me to explore other possibilities that I might not otherwise have considered (in particular, Lisp and Scheme-like languages, which I doubt I would have otherwise given a second look -- they were just "weird languages that we spent a couple of weeks looking at in college - and oh, yeah what's up with all those freaking parentheses?").
- josefx 4y ago> The complexity you are required to manage in order to push the limits of C++ makes doing so not worth it. Sometimes the point is just having it possible. Sometimes I need to get that last bit of performance out of some code. > (in particular, Lisp and Scheme-like languages If your performance requirements are more in the scripted range then C++ will seem like overkill. I often use python for quick and dirty tools, however every other time I end up rewriting things in C++ because something that should finish almost instantly takes half an hour.
- nocman 4y ago> Sometimes the point is just having it possible. Sometimes I need to get that last bit of performance out of some code I'm talking about complexity beyond using a small subset of C++ features, things like template metaprogramming (but not limited to that). > If your performance requirements are more in the scripted range then C++ will seem like overkill. I often use python for quick and dirty tools, however every other time I end up rewriting things in C++ because something that should finish almost instantly takes half an hour. I have a wide range of requirements depending on what I am working on. I can still drop down to a C or C++ level if I need to, but if I do use C++ it will only be a limited subset that minimizes complexity. Also, you imply that Lisp and Scheme-like languages are limited to performance on par with Python or other so-called "scripting languages". There are languages in that vein that can perform very close to C's performance (Gambit Scheme being one such example). Often instead of rewriting in a lower-level language, you can use optimizations in the language to improve performance. Of course you can also just rewrite smaller portions of code in C or C++ and call that code from another language. I'm not someone who just dabbled in C++ for a little while and gave up. I have decades of experience with it. I wanted to use it beyond "C plus a little extra", but I found that the further from a C-like subset I went the more incidental complexity I had to deal with, and in the end the benefits I was looking for just never materialized.