On 11 Feb 2015, at 20:33, Sebastian Sastre <sebastian@flowingconcept.com> wrote:
On Feb 11, 2015, at 5:08 PM, Esteban A. Maringolo <emaringolo@gmail.com> wrote:
Syntax extensions (pluggable?): I know we have many alternatives, which I used and are more than acceptable , but I'd like to write JSON as close as possible to its original syntax.
+1 except I would not say that "I want to write JSON as close as possibleâ.
Itâs either zero friction or itâs already good enough.
In Amber, for example, you already can write a JSON object âas close as possibleâ to the original syntax and is o-kay but is not really great because youâre still being taxed when compared to JavaScript and that taxing might never payoff, thatâs why I say that we are either currently okay or we move towards zero-JSON-friction.
Amber: #{ âkey1â-> value1. âkey2 -> value2 } <â kind of okay, survivable
And we have { #key1->value1. #key2->value2 } asDictionary which is acceptable to me (you can auto complete asDi-). You want interpolation anyway, this construct gives you that.
JavaScript: {key1: value1, key2: value2} <â awesome, no friction to party with the rest of the world, it rocks!
Seriously, JSON is JavaScript's native format, of course it's easy to use, duh. Every language can use its own literal format with 'no friction'. And the fact that the rest of the world is compatible with JSON is not their doing, but ours ! Sven BTW: technically, JSON is not completely identical to JavaScript and not using a proper parser is a security risk.