|
It’s confusing when # does one thing and ipairs() does another. If you recall the debate over changes to ipairs() prior to Lua 5.3 (and the changes it underwent during the betas) than yes, I think it can be called confusing. Remember that as a scripting language Lua often has programmers who have far less software knowledge than a seasoned C/C++ veteran, and so the language really needs to be as consistent as possible (imho). And you only have to look at the number of times the whole issue with sequences/#/nil comes up in this mailing list. —Tim |