[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Module finalization (along the lines of calling a function on exit)
- From: Rici Lake <lua@...>
- Date: Fri, 19 Aug 2005 08:17:28 -0500
On 19-Aug-05, at 7:40 AM, Lisa Parratt wrote:
Antero Vipunen wrote:
Oh my god.
<crazy mad idea>
Another option, though it's horrendously evil.
What's wrong with upvalues?
It'd be so much easier with individual metatables for functions.
In 5.1, CFunctions will have an environment table just like Lua
functions. So that could be assigned to the package table. (In fact, I
think the 5.1 loadlib system does exactly that. It certainly seems to
have a dynamic unloading __gc method, at least on some OS's.)
But I'm still not convinced that unloading dynamic modules is a good