News for hackers. Stuff that matters.
Re:Lua: the world's most infuriating language? by aDevilInMe on Friday October 18, 2013 @09:05AM (#6571116)
1 based indices are fine most of the time, they are mostly like 0 based yet start at 1 :) When it does become a problem is when you are reading and using binary formats and offsets, where I seem to always get off by one errors. A ternary function, iff, is soo simple to implement Lua. Scoping is just something you have to understand as with tables there is no problem with them besides a beginners understanding of them.

What you consider a minor gripe, compound assignment operator, I personally think is a flaw in the language same goes for bitwise functions instead of operators. Here is an example I posted earlier on twitter.

object = object + other

"object" and "other" here are full userdata and the code is going to malloc a new userdata and also create a new object in C/C++; which is straight away going to over write the original instance. Huh? why? += makes so much sense.

Each to there own, I can fix my issues using patches but it would be nice if I did not have to.

Re:Lua: the world's most infuriating language? by bonzaro on Friday October 18, 2013 @05:01PM (#6573990)
Might I ask, how would you implement a ternary function that should retain the lazy evaluation quality of the syntactic ternary operator?
Re:Lua: the world's most infuriating language? by justincormack on Friday October 18, 2013 @09:23AM (#6571190)
I have started just using iterators for stuff that starts at 0.