lua-users home
lua-l archive

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

On 06/19/2014 10:32 PM, Luiz Henrique de Figueiredo wrote:
Here are the main changes since work2:
	- exponentiation is only for floats
	- more functions in math handling integers
	- new API for continuation functions
	-'*n' reads both floats and integers
	- new function debug.Csize
	- new API function lua_rotate, lua_isyieldable
	- more flexible __eq
	- stand-alone interpreter creates 'arg' before running any code
	- coercion from strings to integers (on integer operations)
	- deprecation of some math functions

The complete diffs from work2 are at

All feedback welcome. Thanks.

Thank you for your effort and especially for the little function lua_isyieldable,
I will not have to patch that into Lua again when we switch to 5.3 and it
will be handy for those who don't patch Lua and want to write an yielding hook.

I also like that __eq is more flexible, but as I read the manual it is still more restricted than __le. I don't really like that because I would like to write metatables where

a <= b AND a >= b   <=> a == b    [1]

But it seems to me that this is not possible if one of those is number/string and the other is table/userdata.

The only solution to satisfy [1] is to always return false in those cases for __le