3 ms·
Just because it gets easier over time doesn't mean memory management is not manual. You still have to think about ownership, stack vs heap, when things are free
by kazagistar 10y ago
Just because it gets easier over time doesn't mean memory management is not manual. You still have to think about ownership, stack vs heap, when things are freed, clone vs move, and so on. While the compiler will catch if you mess up, every piece you consider I'm a design has a mental cost.
I would argue that memory management in Rust is a much smaller burden then you might expect, bit it's still there.
- jmcomets 10y ago> You still have to think about ownership, stack vs heap, when things are freed, clone vs move, and so on. Some responses: - ownership / clone vs move = Valid concern in any imperative language. - stack vs heap / when things are freed = Nope. Things are freed when you no longer use them. Are you upcasting to a parent "class"? Use `Box::new(value)`. Otherwise there's no cognitive overhead. I come from C++ and I've written quite a lot of Python. Rust feels a lot more like a typed Python than C++, memory-wise.