[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: RE: Coroutine support in 4.1 / IPC mechanisms
- From: "Philippe Lhoste" <PhiLho@...>
- Date: Fri, 20 Apr 2001 15:37:07 +0200
> >> - 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.
OK, since I though that print will always be defined (which isn't true since
it resides in a library), I missed the point...
> >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?
Yes, but what I would like is to put these functions in the standard math
library, ie. in the official release. Ie. in the official lua.exe. So if I
use such a function in a (standalone) script, users won't have to fetch the
special lua.exe able to process it. These are quite standard functions, hard
to emulate in Lua only.
Unless the "require" mechanism makes my request pointless...
Philippe Lhoste (Paris -- France)
Professional programmer and amateur artist