2 ms·
Your snarky question is so far drawing a lot of snarky responses. However, the implied question here is absolutely valid: Why write your own flat-file format
by StevePerkins 8y ago
Your snarky question is so far drawing a lot of snarky responses.
However, the implied question here is absolutely valid: Why write your own flat-file format parser from scratch, when there's a multitude of battle-tested third-party libraries already in existence?
I mean, if you're writing something very specialized or proprietary, that's one thing. But if you're simply proposing a generalized tree shape that looks like YAML, then why not indeed use YAML? I know it's tricky to write a YAML parser... but so what, why would you? There are already a ton of great ones.
- rsl7 8y agoIt's a superset of csv, what's the problem?
- breck 8y agoTwo good reasons to not use YAML for this interactive example: 1. intermediate steps in YAML are often invalid documents (breaks the update on every key press) 2. you have to be trained to write YAML. It is quite easy to make a syntax mistake with YAML if you aren’t used to writing it. Not good for an interactive experience
- tracker1 8y agoAnd arbitrary spaces with meaningful input isn't easy to make a mistake... my first thought, what about escaping newlines?