-
Was an ownership model taken into account for the memory management? Or are there some plans to evaluate it in the future? What are the downsides of such techniques that do not let them to be used in nelua? I agree that a Rust-like ownership is too complicate for a language like nelua, but lobster [1], for example, showed that it is possible to construct a ownership system with minimal overhead for the user. [1] http://aardappel.github.io/lobster/memory_management.html |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
This is not being considered at the moment, but not completely out of the table. I think the ownership memory model is not simple or easy to use or fun for newcomers, the target audience of Nelua. I have ideas of making the compiler have strict safe rules using an improved GC first, perhaps after that for the non-GC side some other very simple memory model could be researched. But I think more on the lines of using improved allocators or handles with generational ids, than the complicated Rust-like of borrowing for a safer manual memory management model. |
Beta Was this translation helpful? Give feedback.
This is not being considered at the moment, but not completely out of the table. I think the ownership memory model is not simple or easy to use or fun for newcomers, the target audience of Nelua. I have ideas of making the compiler have strict safe rules using an improved GC first, perhaps after that for the non-GC side some other very simple memory model could be researched.
But I think more on the lines of using improved allocators or handles with generational ids, than the complicated Rust-like of borrowing for a safer manual memory management model.