3 ms·
I don't see what's wrong with Python for a first course. In fact, you can go very far with Python alone (in terms of performance) if you learn to use Numba well
by drnick1 1y ago
I don't see what's wrong with Python for a first course. In fact, you can go very far with Python alone (in terms of performance) if you learn to use Numba well. If that isn't enough, I would go straight to C (opportunistically augmented by C++98 when needed), and learn how to use the GNU Scientific Library and Eigen (the linear algebra library).
- adastra22 1y agoNobody should be using C/C++ for anything new, much less using it as a teaching vehicle. That's just irresponsible at this point.
- drnick1 1y agoNot 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.
- pjmlp 1y agoFirst create the alternatives, including industry standards, then yes we can consider stopping using them, even if they have plenty of issues.