2 ms·
Just like any JSON is legal JavaScript, I want a functional programming language where any legal Jsonnet is a legal subset of the language. That'd be cool.
by kasajian 8y ago
Just like any JSON is legal JavaScript, I want a functional programming language where any legal Jsonnet is a legal subset of the language. That'd be cool.
- jwdunne 8y agoI'm not sure but perhaps ReasonML is worth a look at? I don't know if you can specify property names with quotes. Lists are also homogenous but that'd be the case with most functional languages with a static type system. You could also go to town with reader macros in Lisp or use Racket.
- acjohnson55 8y agoJSON is not actually strictly a subset of JavaScript, surprisingly. Although, in practice, it doesn't really matter, because you wouldn't want to blindly eval JSON data, anyway. I mention this not to be pedantic, but in case it helps another coder from wasting a couple days chasing a bug like I once had to, when I thought I could template raw JSON into a script file to make some server-side data available as a global var on in the browser. http://timelessrepo.com/json-isnt-a-javascript-subset http://timelessrepo.com/json-isnt-a-javascript-subset