3 ms·
Without assuming order, you'd be forced to use something that explicitly provided order, such as an array. I suppose you could use { "jexpr": [ "f
by thyrsus 12y ago
Without assuming order, you'd be forced to use something that explicitly provided order, such as an array. I suppose you could use
{ "jexpr":
[ "function",
"and",
"its",
[ "arguments",
"may be",
"arbitrarily complex"] ] }
- emeraldd 12y agoOr better yet, how about something like: [ "jexpr", [ "function", "arg1", "arg2", ["Complex", "argument"]]] Which wouldn't break the spec either. It also happens to pretty closely match an S-Expression.
- dugmartin 12y agoIf you made simple strings atoms and a "'triple quoted'" strings (or substrings) a string then you could implement a simple Lisp in it by replacing the parse() function in https://www.hackerschool.com/blog/21-little-lisp-interpreter https://www.hackerschool.com/blog/21-little-lisp-interpreter. Might be an interesting way to expose an api.