For sure, Rust have the most innovative and one of the most interesting memory management designs out there. Having full memory safety without any runtime overhead at all (e.g. garbage collection or reference counting) is an enormous achievement, but, still, I am wondering if there are any other innovative solutions to be discovered?
I ended up on this forum because I wasn’t able to think of a place with bigger concentration of similar-minded people. It would be cool if you, guys, have any innovative ideas and concepts, so we can start a little discussion!
As for now, these are the interesting ideas I have encountered:
- Region based memory management Quite old, but still interesting idea, which was already implemented and tested several times in different programming languages. It appears not to have any memory safety guarantees, as some forms of automatic region-based allocation/deallocation of memory can suffer a lot from iteration and loops. Also, requires nearly the same amount of effort to maintain as manual memory management, except guarantees deallocation at some point (?).
- Reference counting with eventual cycle collection It sounds like quite a nice idea from both performance and memory preservation standpoints. However, it ruins the idea of leveraging compile-time information for smart, statically-analyzed memory model. Also it introduces some overhead. It is interesting how many interesting ideas there is posted in form of white-papers, even dating back to 1982, but nearly all of them require eventual garbage collection to be totally safe.
- Rust’s concept I am definitely not the person to evaluate and discuss Rust’s genius memory management concept. Nevertheless, in my opinion, if such a memory model is possible, there must be some other yet undiscovered concepts which are, maybe, less safe, but also more expressive and easy to use for beginners.
I also tried to make up my own concept of compile-time data based memory system, but have gradually reinvented the same ideas rust have already introduced, so, no fresh discoveries here.
Thanks for your attention! Hope to hear your thoughts and ideas.