lua-users home
lua-l archive

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


Maybe weak tables?

Oh I use them in Lua! Usecase, opaque handlers given to a user script, which the weak table links to the full implementation in the "core". Once the user script drops them, the core can cleanup the linked objects too.

And I'm looking forward to the day _javascript_ finally gets something similar (WeakMap/WeakSet is only half of it). I'd really want to intern immutable objects by hash values which is not yet possible.