3 ms·
> 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
by 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.