I have been using golang for cli applications for the past 6 years and love it. Been looking at rust but haven’t been convinced to try it out yet.
Any big win that I would get from a practical standpoint with rust that im missing with golang?
Any big win that I would get from a practical standpoint with rust that im missing with golang?
Rust of course has generics too, so I find it easier to use the right data structure for the problem (eg btrees) without dropping to interface{}. But it seems like the Go team is getting serious about adding generics so this advantage may be temporary.
That said, when Rust code spends a lot of time on allocations, it's usually fixable:
* You can switch global allocators to jemalloc or, for short-lived programs with acceptable total allocation size, bumpalo.
* You can often restructure code to borrow/reuse buffers instead of having per-iteration allocations.
* You can use slabs or arena allocators.