4 ms·
I feel like I've seen countless attempts at this, and this design doesn't seem any better than usual. There's not much in here to justify the design decisions,
by zahlman 2y ago
I feel like I've seen countless attempts at this, and this design doesn't seem any better than usual. There's not much in here to justify the design decisions, nor any indication that a parser implementation exists or is even being actively worked on. For something meant to be "Efficient to write by hand", the insistence on tag-like syntax but with "tags" that consist entirely of a single punctuation character, or which have an extra open bracket, seems error-prone. "Leading and trailing newlines and spacing are intuitively removed from scalars as is indenting." is not adequate guidance for something that claims it "can be implemented to be blazingly fast or using a mode-less tokenizer/parser" (and "mode-less" seems like a strong claim for something that appears intended to support arbitrarily nested objects). This isn't what I would call "terse" given the need for closing tags (which also, according to feedback I've received myself before, counts against human-writability), and it's not at all clear why "the [top-level?] document is named" is advantageous.
- deleted 2y ago[deleted]
- GeneThomas 2y agoBoth a C# and JavaScript implementations exist. The terse “single punctuation character”, e.g. <$> make it efficient to write, more efficient than JSON. There is no “extra open bracket”? There is a overview of how the indenting operates. Mode-less, means the tokeneizer does not require modes, unlike those required for XML. The parser has state. Have the top level document named allows one to see what the document is, e.g. <Example-Document> or <Person>.
- zahlman 2y ago`<$>` is not simpler than `}`, nor `]`. The array syntax has the "extra open (angle) brackets": in `<<Names> Fredrick <&> Freddy <<$>` we see `<` more often than `>`.
- GeneThomas 2y agoIt is more terse than JSON.
- zahlman 2y agoHave you created any benchmarks to demonstrate this?
- GeneThomas 2y agoSee https://news.ycombinator.com/item?id=42038004#42049033 https://news.ycombinator.com/item?id=42038004#42049033