Indeed, feels super unusual and tooling is lacking, but behold the concise rationality:
; const url
= "..."
; const contact
= { "firstName"
: "John"
, "lastName"
: "Smith"
, "address"
: { "streetAddress"
: "21 2nd Street"
, "city"
: "New York"
, "state"
: "NY"
, "postalCode"
: 10021
}
, "phoneNumbers"
: [ "212 555-1234"
, "646 555-4567"
]
}
; const result
= sendData
( url
, contact
)
; rejoice
( result
)
Beauty. N.B. those opening and closing delimiters "connected" by breadcrumbs of separators. Isn't it lovely?Most developers I know will immediately lit torches and grab pitchforks if you show them this.
(Personally, I'm using it sometimes for private doodling, and while reformatting obfuscated or exploring some complicated codes; mostly just to improve own reading comprehension.)
If you relax the rule to allow "single simple value" to be in the same line (so break the rule for "=" / ":" on the start of the line), it could look lie this [1]