4 ms·
A possible solution would be to devise a language with a type system that tracks allocation, such that a garbage collector is not needed, and that all allocatio
by Athas 12y ago
A possible solution would be to devise a language with a type system that tracks allocation, such that a garbage collector is not needed, and that all allocation deterministic, and yet safe. Some work has been done on this already, in the form of region inference systems, although they have to my knowledge only been used to compile functional languages to run without a garbage collector, and not been exposed in the user-visible type system. The MLkit compiler for Standard ML is the most prominent region-user I am aware of.
- codygman 12y agoI believe that ATS[0] has/can do this, perhaps I'm confusing another feature. Anywho, there's also a very comprehensive ATS book[1]. 0: http://www.ats-lang.org/ http://www.ats-lang.org/ 1: http://ats-lang.sourceforge.net/DOCUMENT/INT2PROGINATS/HTML/INT2PROGINATS-BOOK.html http://ats-lang.sourceforge.net/DOCUMENT/INT2PROGINATS/HTML/...
- twic 12y agoObligatory Rust comment: Rust's type system relates allocation to variable lifetime in such a way that garbage collection is not needed, and almost all deallocation is deterministic, and yet safe. Rust is still in flux, and its documentation is a bit all over the place, but here are some references: http://doc.rust-lang.org/guide-lifetimes.html http://doc.rust-lang.org/guide-lifetimes.html http://pcwalton.github.io/blog/2013/03/18/an-overview-of-memory-management-in-rust/ http://pcwalton.github.io/blog/2013/03/18/an-overview-of-mem... (warning: contains old syntax and defunct features!)