About arrays starting at 0, many times I find it convenient and logical to start at 1, it's just a matter of switching < to <= and adjusting some of the addition and subtraction we do on indicies. It's all a matter of what you're used to.ishkabible wrote:List of my issues with Lua(many of which have been said):
*no += like operators, and no ++/-- operators either
*no control over for loops, sometimes i want a different condition than <= or a more complex increment than addition
*globals by default is really annoying, locals by defualt would be equally annoying. i can't tell you how many bugs i have had becuase i mistyped a variable
*no bit-wise operators, this doesn't effect me very often but when it dose i hate it.
*arrays start at 1, WTF!! they should start at 0!!
*no default OO mechanisms, i would like to have a means to literally write a class
*no type dispatching, i hate writing all those type checked functions that do different things for different types. i want function overloads
*'tonumber' dose not support a __tonumber meta method. what if you want to make a number class of sorts. i made a ratio class a while back and i wanted to be able to convert to number, i settled for a method instead.
*~=...WTF what happened to !=?
*and, or, not ... i don't like them i prefer &&, ||, ! instead
however all and all i love Lua, it's my second favorite language. it basically rocks. meta-methods are sexy, Lua is fast, Lua is cool.
edit: wtf how do you use the List BBcode?
Yeah, I'd love a __tonumber metamethod, it would be great for things like fuzzy booleans and the like.
Personally I love the use of and, or, not, it makes things look so much cleaner and clearer for me, but again it's all preference. I also like how Lua doesn't have both sets with different precedences like Ruby does, meaning I keep having to mix the two sets up in my code.