BUT I've used newLISP in many web business applications, which are still used by hundreds of users, under load and I've never ran into trouble. Developing and coding such big projects has been great (we used newLISP contexts a lot).
I'm trying to say: in practice I don't care about internal memeory management if the language does it job. And in my opinion newLISP is a good tool to solve real world problems.
- single-reference-only for expressions (so, static object lifetime); deletion is delayed until a stack slot gets reused, allowing return values
- assignment to variables or values passed into functions are done by copy
- EXCEPT certain types are passed into functions by reference as an optimisation
So, basically, values are owned by either the stack or a variable. Assignment to a stack cell destroys what was there before. To keep a stacked value, it needs to be copied into a variable.
That all seems pretty intelligent, and I might steal the idea; except that I don't see any mention of how cyclic data structures or mutable data structures are implemented. Does anyone know how these are handled?
For cyclic data structures, I'm not sure. I think one can pass a function, a list or a context to a function that expects a list. This it might do the trick.
> Sharing of sub-objects among objects, cyclic structures, or multiple variables pointing to the same object are not supported in newLISP.
Dang.
Does it mean it's impossible for more than one variable to refer to a variable already referenced? If yes, is this a problem in practice? If no, is this the way of the future?