Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Yeah. Speed and memory efficiency don’t come for free. Use Rust when you benefit enough to compensate for the cost of grokking the plumbing.


Arc is a low level tool for writing multi threaded programs. If it scares you back to Python you could also just write single threaded Rust.


There are many simpler languages with speed and memory efficiency (Nim, Crystal and the like). Rust somehow became even more complex than C++; what an achievement (not).


Two things that might help Rust a lot despite the complexity are the tooling and the ecosystem. Cargo is good, the compiler is extremely helpful, and there are a lot of crates to build on for all sorts of tasks.

For example, if I need to use simulated annealing to solve an optimization problem, there already exist libraries that implement that algorithm well.[1] Unfortunately, the Haskell library for this seems to be unmaintained[2] and so does the OCaml library that I can find.[3] Similarly, Agda, Idris, and Lean 4 all seem like great languages. But not having libraries for one's tasks is a big obstacle to adoption.

Nim looks very promising. (Surprisingly so to me.) Hopefully they will succeed at gaining wider recognition and growing a healthy ecosystem.

[1] E.g., https://github.com/argmin-rs/argmin

[2] https://hackage.haskell.org/package/hmatrix-gsl-0.19.0.1 was released in 2018. (Although there are newer commits in the GitHub repo, https://github.com/haskell-numerics/hmatrix. Not too sure what is going on.)

[3] https://github.com/khigia/ocaml-anneal


Fwiw, hmatrix-gsl works trivially and painlessly. Why does a working library need changes?


Good to know that hmatrix-gsl works too. In this case, I went down the Rust route instead of the Haskell one. I use Haskell too, just not for simulated annealing.

My main domain is scientific computing and I get nervous about the prospect of not being able to run my code 5 or 10 years down the road (somewhat above the typical lifespan of a project that ends up published in my discipline). GHC gets updates that sometimes require library maintainers to update their libraries. Here is a list of a few:

https://github.com/fumieval/Haskell-breaking-changes

Rust promises no breaking changes in the stable part of the language. Hopefully this promise will hold up.


> Rust somehow became even more complex than C++

I use C++ professionally and the small subset of it that I've learnt is already way more complicated than rust.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: