3 ms·
Why is rust not good at low-level memory management? Can you give an example?
by andrepd 3y ago
Why is rust not good at low-level memory management? Can you give an example?
- matu3ba 3y agoHard mode Rust provides the trickyness of separating memory handling from the (pure) code logic https://matklad.github.io/2022/10/06/hard-mode-rust.html https://matklad.github.io/2022/10/06/hard-mode-rust.html which makes batching inputs unnecessary hard. The other main tradeoff is that explicit lifetime annotations make (big) refactorings or explorative coding harder, unless one uses a lot copies or shared pointers (unacceptable for Kernel code). However, I am not familiar how those two tradeoffs ought to be solved in Kernel. I would expect that Rust would do rarely changing high level abstractions expected to never change fundamentally in design and/or being limited in scope.