Re:Show HN: a Lisp that uses JSON instead of S-expressions (...
by tikhonj on Tuesday November 29, 2011 @01:18PM
(#3291426)
I haven't use Lua, but that sounds exactly like JavaScript objects. JavaScript does get on very well with basically just these objects.
[ Parent
| on HN ]
Re:Show HN: a Lisp that uses JSON instead of S-expressions (...
by premchai21 on Tuesday November 29, 2011 @01:25PM
(#3291466)
They're similar, but the Lua form is much cleaner. In particular, JS objects only permit string keys, which makes Arrays sort of preposterous; they also have other baggage related to the prototype system. Lua tables can have any type except nil (which is not truly first-class in Lua) as keys, and can also have "metatables", which are of similar or greater power to the latter baggage but semantically somewhat simpler. To me this makes a world of difference.