News for hackers. Stuff that matters.
Re:Lua: Good, bad, and ugly parts by vor_ on Saturday March 09, 2013 @03:11PM (#5349472)
Only nil and false evaluate to false. Because there's no distinction between nil and non-existent elements, checking the existence of an element with a value of 0 requires that 0 evaluates to true, so you get this situation:

  while 0 do print("loops forever") end
  while not 0 do print("does nothing") end
Re:Lua: Good, bad, and ugly parts by spicyj on Saturday March 09, 2013 @05:16PM (#5349814)
What you're saying is just that in Lua, 0 is truthy. Ruby is the same way, not a big deal.