top | item 45514936

(no title)

RedNifre | 4 months ago

If you already have quotation marks, what's the point of the commas?

discuss

order

bayindirh|4 months ago

Try parsing this:

    { foo :"bar" baz :"bak" quux :[ a,b,c,d ] lol :9.7E+42 }
Ref: https://www.json.org/json-en.html, but without commas. It's line noise. Commas allow a nice visual anchor.

practal|4 months ago

Oh, actually that is the syntax I will use for writing abstractions:

    my-abstr x y z foo: "bar" baz: "bak" "quak" quux: [a, b, c, d] lol: 9.7E+42
I don't think

    my-abstr x y z, foo: "bar", baz: "bak" "quak", quux: [a, b, c, d], lol: 9.7E+42
would be better. Indentation and/or coloring my-abstr and the labels (foo:, baz:, quux:, lol:) are the right measures here.

RedNifre|4 months ago

Looks easy to parse to me and you could also remove the commas in the array.

    { foo: "bar" baz: "bak" quux: [a b c d] lol: 9.7E+42 }