| > It seems like you’re conflating dynamic Perhaps I should have said heap memory to be more clear, but the intent was to recognize that C does have memory management (the stack), but it manages it automatically. However, I don't think the intent was actually lost as you specifically called out malloc, which was directionally correct. So I guess there was no need to be more clear as the message was delivered just fine. > C definitely has manual memory management via malloc No. malloc isn't part of the C language, it is a library function and one that isn't guaranteed to be available at that. > It can be reasoned about, but doing so correctly is very difficult To the best of our knowledge it is impossible. That is why Rust's claim to fame is adding a model necessary to make reasoning about memory possible. > C has dynamic memory (again, malloc and free) Again, malloc and free are not language features. They are bolted on top. You can bolt malloc and free onto every language under the sun. You can even bolt malloc and free onto Rust, but you will then break the ability to reason about its memory if you use it. |