lua-users home
lua-l archive

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

>> - weak tables
>What is it?

Key and/or values in weak tables are subject to GC, ie, they may be collected.
The reference mechanisms will be implemented using a weak table in 4.1, but
there are others uses: see LTN 6.

This is another example of metamechanisms: instead of implementing weak
references, we implemented something more general... But it's left to you
Lua programmers around the world to find ways of exploiting it.

>I can't figure out what (print or write)(9) will do...

That was just an example. But it calls print or write, if print is not defined.

>I would like to see binary operations: and or xor, perhaps shifts. This
>would help to parse binary headers of files, among other things, and doesn't
>cost much.

There are libraries for this, aren't there?