Re:Lua: Good, bad, and ugly parts
by ufo on Saturday March 09, 2013 @05:47PM
(#5349890)
Most of the times I use foreach loops like
so the 0 vs 1 based indexing is made irrelevant. There are some times where mess up but overall most Lua users don't think its much of an issue. (Personally, I find the lack of a ternary conditional operator much more annoying)
[ Parent
| on HN ]
ipairs is deprecated in 5.2, no? What is the alternative?
where'd you get that from? it's not deprecated: http://www.lua.org/manual/5.2/manual.html#8.2
http://www.corsix.org/content/look-lua-52-work3 (#19)
http://lua.2524044.n2.nabble.com/petition-to-keep-ipairs-ali...
Edit: both are from 2010. This never became final perhaps?
Hmm, weird. It definitely isn't deprecated now, according to the docs[1] and I haven't seen anyone complain about ipairs recently ever since I learned the language ^^. But anyway, the only real downside about ipairs is efficiency so even if they removed it I would probably just add it back myself as a regular function.
Apparently no longer planned: http://lua.2524044.n2.nabble.com/ipairs-deprecated-td7647152...