Re:Computer Language Benchmarks Game – Rust vs. Go
by shanemhansen on Tuesday December 23, 2014 @09:55PM
(#8791346)
Technically it's not true that heap allocation is your only option on go. In Go you have 0 options but stack allocation is automatically done in some cases.
[ Parent
| on HN ]
Re:Computer Language Benchmarks Game – Rust vs. Go
by TheHydroImpulse on Wednesday December 24, 2014 @12:11AM
(#8791639)
Yes, escape analysis does tend to eliminate some unnecessary heap allocations but they're specifically isolated to a single subroutine (it's better than not having it). Whereas with Rust, you can safely pass around references to stack allocated memory to other subroutines, given proper lifetimes.