6 ms·
I used to program C++ a lot, several years ago. My way, today, to avoid complexity in C++: Avoid C++! C++ is at least three languages and the complexity is at
by PythonicAlpha 11y ago
I used to program C++ a lot, several years ago.
My way, today, to avoid complexity in C++: Avoid C++!
C++ is at least three languages and the complexity is at least that of three languages. If you really want to be faster at programming and don't need to have the last 5% of performance, do you a favor and use an other language.
- unabashedturtle 11y agoFor some of us, that 5% is incredibly valuable. Really, any HPC application is going to either be written in C/C++ or Fortran. It goes without saying that modern fortran is a hideous language (even though it's still better than Fortran 77). C is nice and simple but without things like namespaces and classes you're going to end up with huge function names. Not to mention a high risk of memory leaks. C++ was awful years ago. Honestly C++11 allows you to write fairly nice code. By no means a guarantee you'll write clean-ish code, but it definitely gives you the tools to do so. Plus modern C++ compilers produce really fast code (that leverages SIMD/vectorization, etc.). I'm a huge fan of Go and Rust but the former is often dogmatically minimalist to the point of not including things like templates, operator overloading, etc. Not to mention garbage collection/runtime which is a big no-no for numerical computing use. The latter is still not mature enough to fully commit to (and is nowhere near the speed of optimized C/C++).
- steveklabnik 11y ago> (and is nowhere near the speed of optimized C/C++). Please file bugs! We consider them as such.