[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Deprecated calls
- From: Attila <ejjeliorjarat@...>
- Date: Sun, 07 Feb 2010 11:45:13 +0100
Hello all!
I am curious about the new Lua version, and I have some questions.
Lua5.2.0 (work2) Copyright (C) 1994-2010 Lua.org, PUC-Rio
for a in pairs(table) do
print(a)
end
pack
insert
getn
foreachi
maxn
foreach
concat
unpack
sort
remove
This output confused me. The changelog of the 5.1 version says:
Functions table.foreach and table.foreachi are deprecated. You can use a
for loop with pairs or ipairs instead.
Since table.getn/maxn does (now rather did) the same job, they have been
also deprecated.
I think if somebody need them, then _they_ should modify the luaconf.h
file (if I'm correct), and the official version shouldn't contain these
old things.
Same for the string library: string.gfind is still there, even it's
renamed to gmatch long time ago. (but strange, math.mod disappeared, and
just fmod and modf are there...)
By the way, string.len will be deprecated as well? Because I think the #
operator does the same job, therefore it's unnecessary.
Regards:
Attila