{:a 1 2 :bar [1 2 3] :baz}[0] https://github.com/bbatsov/clojure-style-guide#opt-commas-in...
This is the case with any hash-map in any language, modulo some of them making certain keys illegal.
But "string":"string" can be reversed in pretty much any language's hash-map.
>here's no way to tell at a glance what e.g. the value associated with:bar is.
You've certainly constructed and formatted a hash-map that is a little tricky to understand, but 1> this combination of key and value types is going to be pretty rare in the wild and 2> to the extent it exists, people would format it to be easier to parse, either by adding commas or newlines.
That's not true. What you're seeing here is a map where [1 2 3] is the key for the value :baz
Per that style guide, the above map should be formatted like this:
{:a 1
2 :bar
[1 2 3] :baz}
Most maps written in EDN have keys of a consistent type. A map whose keys are consistently keywords would look like this when formatted: {:a [1 2]
:bar "https://example.com/"
:baz [1 2 3]}
HN comment formatting help: https://news.ycombinator.com/formatdoc. I indented the above code by two spaces.Some differences: EDN has characters, keywords, lists, and sets Ion has dates, decimals, timestamps, s-expressions, and blobs
Ion has a binary serialization, hashing standard, and schema language.
https://github.com/edn-format/edn