lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

On Wed, 2005-02-16 at 23:43, Mike Pall wrote:

> The 'real' solution would be to use Edgar Toernig's idea of tagging
> every closure with the module where it is loaded from and get 'true' GC

This is implemented in Felix (more or less).

It only works if there are no 'cheats'.
In particular pointers to any static data
of the library, including char literals,
C++ virtual tables, RTTI, finalisers,
ordinary C functions, and who knows what else ..

The *only* thing protected is function closures :(
It's all very fragile. For Lua it won't be any better.

As usual, C is the big problem: it doesn't and never
will work with C, so why would it work in a system like
Lua (or Felix) with a C API?

John Skaller,
voice: 061-2-9660-0850, 
snail: PO BOX 401 Glebe NSW 2037 Australia
Checkout the Felix programming language