3 ms·
Just use EDN. Not only it supports comments and trailing commas, it allows to avoid commas at all (they are simply ignored by EDN). Commas indeed are just redu
by avodonosov 2y ago
Just use EDN.
Not only it supports comments and trailing commas, it allows to avoid commas at all (they are simply ignored by EDN). Commas indeed are just redundant and incur visual noise most of the time.
[1, 2, 3]
[1 2 3] ; much better
The spec: https://github.com/edn-format/edn/blob/master/README.md https://github.com/edn-format/edn/blob/master/README.md
Examples at github (261k files found at the moment) : https://github.com/search?q=path%3A*.edn+&type=code https://github.com/search?q=path%3A*.edn+&type=code
Github search only shows the first 5 pages of results. To extract more results split the search with more specific path qalifiers:
path:*a.edn
path:*b.edn
path:*c.edn
- avodonosov 2y agoAfter adopting EDN dont fall into the deceptive feeling that Douglas Crockford is you son.
- lukan 2y ago"Commas indeed are just redundant and incur visual noise most of the time." I would argue semicolons are and only sometimes commas. Personally I prefer [1, 2, 3] much more over [1 2 3]. With long numbers and dots and strings and whatever, the seperator is helpful for me.
- avodonosov 2y agoIf and when commas improve readability for you, feel free to use them in EDN.
- stoperaticless 2y agoThat possible when you control the creation process. Frequently you can’t control the creation (e.g.external system)