[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: changes (not incompatibilities) to Lua 5.0 beta
- From: Björn De Meyer <bjorn.demeyer@...>
- Date: Tue, 19 Nov 2002 18:55:30 +0100
Roberto Ierusalimschy wrote:
>
> Here is a list of novelties in 5.0 beta (compared to 5.0 alpha). They
> should create no incompatibilities in "normal" programs.
>
> * The compiler does not change the order of operands for "commutative"
> operators. (I don't remember why, but I remember there was quite a
> discussion about that in the list.) (However, "a>b" is still translated
> to "b<a", and "a>=b" to "b<=a".)
IIRC, this was because commutative operators may not be
really commutative when applied to certain user-defined types
or meta-types. Matrix multiplication comes to mind.
> * new facility to precompile Lua code from inside Lua (function
> stringdump).
This is great. Could there also be a functiondump() function
by which you can dump the bytecode of an existing lua function?
I'd love to use such a function to write self-modifying lua programs
that can save their own state, to do some "persistent" AI programming.
Thank you very much.
--
"No one knows true heroes, for they speak not of their greatness." --
Daniel Remar.
Björn De Meyer
bjorn.demeyer@pandora.be