3 ms·
Would love if there was another option between those two as well. I know lots of people love Lua but I find it different enough that using it as an embedded scr
by nicpottier 9y ago
Would love if there was another option between those two as well. I know lots of people love Lua but I find it different enough that using it as an embedded scripting language is annoying. IE, I'm not programming in it all the time, so things like 1-indexing of arrays never becomes feels natural and I make indexing mistakes. Other differences like arrays and dictionaries being the same type cause other context switches which I dislike. (and can cause super subtle bugs in JSON marshaling and unmarshaling if you aren't careful)
I would really love a fast, lightweight stripped down "C Flavored Syntax" dynamic language to use instead of JS or Lua but I haven't found either yet.
- acqq 9y agoI have almost the same feeling as you: I'd love most of the Lua more with zero indexing and more of C like syntax (without these "end" literals, I really like C math-formula-like minimalism). I don't care however if arrays and dicts are the same behind the scenes.
- nicpottier 9y agoYa the weird case we ran into with the dict / list was when unmarshaling some JSON which had an empty list `[]` then marshaling it back to JSON you end up with `{}`. Which is pretty broken and given the prevalence of JSON as an on the wire format is seriously disappointing. Not sure if there's an easy fix to that apart from using `null` instead of empty lists.
- tangent128 9y agoHave you encountered Squirrel yet? It seems to be targeting a "C-flavored Lua" niche: http://www.squirrel-lang.org/ http://www.squirrel-lang.org/