3 ms·
This is quite possibly the first good language comparison I've seen on HN. Good job! The upshot: 1. If you need to eke out that last extra drop of performance
by Max-Limelihood 3y ago
This is quite possibly the first good language comparison I've seen on HN. Good job!
The upshot:
1. If you need to eke out that last extra drop of performance, and can't deal with any mistakes, Rust is good because it makes it very difficult to write slow code. Julia makes it easy, because Julia needs to be easy to write.
2. Julia's greater permissiveness means the compiler can't catch as many bugs as Rust's (although it still catches far more than Python's static analysis tools or C, where every other line has some undefined behavior).
3. If you need interactive+dynamic code, Julia is your best bet. It's a lot like Python in this regard, but with a much better UX in the form of a better REPL, package management, etc. Well-written Julia code will also be just as fast as Rust or C++, meaning you can use it for high-performance computing.
4. If you want a scientific/machine learning ecosystem, go with Julia.
I think this post is strongest in hitting Julia where its problems are -- Julia can be a bit too permissive/promiscuous with letting you do dumb things.
Where it's weakest is letting Rust off the hook a bit too easy. Rust is good at making it hard to write bad code, but the cost is it makes it hard to write code in general, unless you handle every detail that might slow your code down. You're not going to get users happily writing Rust when they just want to make a plot. It takes about 5-10 lines of Rust to create one line of Julia code.
- queuebert 3y agoOn 1, not quite, because Julia makes it way easier to offload a computationally demanding inner loop to the GPU, which is a big win for a lot of simple scientific programs.
- sanderjd 3y ago> It's a lot like Python in this regard, but with a much better UX in the form of a better REPL, package management, etc. Personally, I have found the package management to be somewhat more difficult to navigate than Python's (which I also have little love for...). But perhaps this is a learning curve thing...