User Tools

Site Tools


snippets:whynot:lua

why lua? not!

  • no array, lists: only tables
  • tables start at index 1
  • comments: – or –[[ multiline comment –]]
  • methods on instances: obj:method or class.method(obj)
  • optional ; on line end, but ;; is illegal “There are no empty statements and thus ';;' is not legal.”
  • .. operator: concat string with number
  • ! → not
  • && → and
local key = "foo"
{[key]= 23}

{foo = 42}
snippets/whynot/lua.txt · Last modified: by allspark