# Comparison of Rust to Julia for scientific computing?

**URL:** <https://discourse.julialang.org/t/comparison-of-rust-to-julia-for-scientific-computing/78508>\
**Category:** Offtopic\
**Tags:** question, rust\
**Created:** [March 26, 2022, 11:47am UTC](https://discourse.julialang.org/t/comparison-of-rust-to-julia-for-scientific-computing/78508 "2022-03-26T11:47:18Z")\
**Posts on this page:** 1\
**Showing post:** 41

<div class="post-metadata">

**Author:** ![StefanKarpinski](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stefankarpinski/32/24_2.png) [@StefanKarpinski](https://discourse.julialang.org/u/StefanKarpinski)\
**Post date:** [March 28, 2022, 3:18pm UTC](https://discourse.julialang.org/t/comparison-of-rust-to-julia-for-scientific-computing/78508/41 "2022-03-28T15:18:17Z")

</div>

> [@Elrod](#):
>
> So while I would like to see a language that enforces this or holds the programmers hands to get there, I also need to remind myself that there are real pros and cons to these tradeoffs.  
> Perhaps in the future we can move more towards the best of both worlds, with libraries like [JET.jl](https://github.com/aviatesk/JET.jl) helping to analyze code and point out problems.

This is really my hope too. Julia still has a number of unresolved tradeoffs, but they are not inherent any more than the performance/productivity tradeoff that Julia has already shattered are. They may be fixable but they are not easy to fix.

The first tradeoff that Julia really needs to tackle is the JIT latency one. Lots of work has been done here but I think what will really “fix” it will be having a tiered JIT where an interpreted version of code starts executing immediately until a fast compiled version of that code is available. Work on that is already starting to happen (lazy LLVM JIT being the first step). It will be accomplished incrementally in the sense that even when it’s mostly solved it probably still won’t include some of the fancier tiered JIT features like on-stack replacement of code running in the interpreter with the same code running optimized. In the fullness of time, if it seems beneficial, all the bells and whistles can be added.

The next tradeoff is the one here: providing a way to move gradually from loose, interactively developed code that may not be fully correct in all corner cases to code that can be shown to be correct and not error in various ways. Rust includes rules to ensure that kind of correctness in its type system and compiler, but that’s not the only way to do it, as JET shows. My hope here is that JET will be extended and eventually shipped with Julia and can be applied to code to show that it is correct with respect to various desirable properties in an incremental way.

---

_[View the full topic](https://discourse.julialang.org/t/comparison-of-rust-to-julia-for-scientific-computing/78508)._
