3 ms·
Not true. C++ is great for scientific computing. There is a huge number of mature libraries like Eigen. You can also painlessly use Fortran/C libraries like LAP
by drnick1 1y ago
Not true. C++ is great for scientific computing. There is a huge number of mature libraries like Eigen. You can also painlessly use Fortran/C libraries like LAPACK, SLICOT and many others. Performance is top notch. It's multiparadigm so you can use OOP where it makes sense. It's a very complex language, but for scientific computing the C++98 subset is enough and IMO it's far cleaner than modern C++ or Rust.
C++ also has by far the best support for graphics (OpenGL/Vulkan) and GUI toolkits like Qt.
- adastra22 1y agoYou can also call out to these libraries from other languages that have far better safety features.
- wolvesechoes 1y agoHow to expose C++ templates through C API do that they can be used from other safe languages?
- drnick1 1y ago"Safety" is largely irrelevant for scientific computing. Manipulation of memory is handled by libraries like Eigen and you don't have to use raw pointers at all.
- adastra22 1y agoSafety is much broader than memory safety. Rust’s “fearless concurrency” is very relevant to scientific codes — being able to use the type system to enforce invariants that make sure you don’t have data races and other concurrency issues that can very much lead to crashes, or worse: bad or corrupt computations.