3 ms·
I'm not sure you'd want to do that. Here's why: It would surely require some fairly severe changes in the Lua runtime. In VisualWorks Smalltalk, I'd just start
by stcredzero 16y ago
I'm not sure you'd want to do that. Here's why:
It would surely require some fairly severe changes in the Lua runtime.
In VisualWorks Smalltalk, I'd just start off by setting objects immutable and using a top-level exception handler on the mutation exception. Alternatively, one could also use forwarder proxies.
This avoids the dependency update chain but adds an extra layer of indirection, which will presumably be a hashtable or so, which could impact performance quite severely and take up a lot of memory.
For building application servers, there should be a mechanism to handle this sort of eventuality efficiently. Such mechanisms are also very useful when building things like Object Relational frameworks. This may be counter to Lua's design goals towards being small and highly embeddable.