Skip to content

Object literals added to the language

Pre-release
Pre-release
Compare
Choose a tag to compare
@sigmasoldi3r sigmasoldi3r released this 11 Sep 10:21
· 29 commits to master since this release

Prior to that, for interoperate with Lua, when a plain old lua table (POLT for short) was needed, you had two options:

  • Provide a table with string keys
{"like" "this"}
  • Or convert a table to object with the object/new function, which is done at runtime.
(object/new {:like "this"})

Now, you can have POLT values compiled statically, so you don't waste process time and memory:

; This will be translated to a POLT value
'{:note "the single quote"}