Remix.run Logo
einpoklum 9 hours ago

> Rust makes it possible to safely manage memory without using a garbage collector, probably one of the biggest pain points of using low-level languages like C and C++.

In C++, memory management has not been a pain point for many years, and you basically don't need to do it at all if you don't want to. The standard library takes care of it well enough - with owning containers and smart pointers.

> And Rust is famous for its optimizations in the style of "zero cost abstractions".

No, it isn't that famous for those. The safety and no-UB constraints prevent a lot of that.

By the way, C++, which is more famous for them, still struggles in some cases. For example, ABI restrictions prevent passing unique_ptr's via single registers, see: https://stackoverflow.com/q/58339165/1593077