Hacker News new | ask | show | jobs
by avodonosov 554 days ago
Dont be pessimistic - you are still free to used it.

I used EDN outside of Clojure. The system needed a relatively large amount of config files, and I chose EDN as a better JSON. Looks familiar to everyone, but supports comments - the primary motivation for that choice.

JSON-5 allows a single trailing comma. EDN simply ignores commas. You can have them, trailing or not. But they are really redundant and incur visual noise.

Perhaps EDN can also be improved, but that's a good format. Convenient.

1 comments

> Perhaps EDN can also be improved

How might you improve EDN?

Maybe with: 1) Unicode escapes in strings. 2) Indentation support for multiline string literals, like in Rust, but even better. 3) Reading with "concrete syntax tree" (make the order of map elements, the comments, whitespaces, etc representable, so that one could write an EDN file with the same formatting as it was read, e.g. after patching it). Not sure if the spec changes are needed / will be helpful for that or better to just implement it in specific parsers.
Excellent ideas, especially having a parser keep order of parsed data.

I wonder if EDN reader/parser for different languages could be written once, then compiled through wasm to c (https://news.ycombinator.com/item?id=38602750) and linked in each language as c library.

Definitely would like to see EDN or slightly improved version as a modern and usable alternative to json/yaml (regardless of https://xkcd.com/927/).