Hacker News new | ask | show | jobs
by saagarjha 2498 days ago
How does Rust differ significantly from C++, other than the fact that neither platform's toolchain can compile it out of the box?
3 comments

I don't know enough details to say for sure, but some possibilities:

1. People may be more willing to learn Rust. I much prefer the language itself, but also it's clearly on the rise, so it may feel like a better learning investment.

2. The standard library is broader and the package ecosystem is easier to work with, so you might be able to have a more standard stack with fewer proprietary bits.

3. One complication with integrating multiple languages is making different memory management strategies coexist. Rust's type system seems to have ways of making that easier, e.g. neon-bindings.com

It is really easy to make a blunder in c++ that will require a lot of effort to find. Debugging that on mobile platforms is not fun. Like they mention a deadlocking issue that was difficult to solve.

Rust is built for memory and thread safety. Also the much better build system and open source ecosystem.

> Debugging that on mobile platforms is not fun

That's debatable ;)

Less foot guns. And it's not crazy in either env to have externally built libraries.