2 ms·
All of your questions are addressed in the article. > Why Rust? Why not Idris? Why not Haskell? it can easily call C code it can easily be called by C
by Shriken 9y ago
All of your questions are addressed in the article.
> Why Rust? Why not Idris? Why not Haskell?
it can easily call C code
it can easily be called by C code (it can export C compatible functions and structures)
it does not need a garbage collector
if you want, it does not even need to handle allocations
the Rust compiler can produce static and dynamic libraries, and even object files
the Rust compiler avoids most of the memory vulnerabilities you get in C (yes, I had to mention it)
- snakeanus 9y agoAll of these except GC also hold true for the languages that I mentioned. As for GC, I think that Mercury avoids its use https://lirias.kuleuven.be/bitstream/123456789/131304/1/Mazur.pdf https://lirias.kuleuven.be/bitstream/123456789/131304/1/Mazu...
- Rusky 9y agoNope- C interop is higher on the list for a reason. Idris and Haskell do not produce straightforward, runtime-less binaries that can be easily loaded by e.g. CPython or Node, without any interference with their runtimes.
- mhh__ 9y agoThese parts are true of D, and C++. IMO Rust's only true advantage over it's direct "competitors" is it's safety guarantees.