> All of these rules lead to unexpected results sometimes, and they make writing a parser for CommonMark a complex affair. > What if we tried to create a light markup syntax [..] revising some of the features that have led to bloat and complexity in the CommonMark spec? Are you writing this new format to make life easier for the humans using it, or the humans programming it? It's sad when programmers don't see the fo…
If the rules are too complicated, then they are a challenge for all parties, both users and implementers. I think it is useful to be able to imagine at least on some higher level what a parser would do to the stuff I write, so everyone benefits from the ease of understanding that comes with simpler rules. The question is just how far we can simplify without reducing usability. The rest of the article frequently takes…
Not necessarily. Generics, and/or C++ templates are a pain to parse because they're context sensitive. But while reading/writing code it's typically obvious whether I'm writing a comparison or a generic/template.
Foo foo;
// VS
Foo
Likewise, in C++ you can end up with: unordered_set> mySet;
// >> is ambiguous here without a symbol table or context around the statement
Foo >> 5;
I think both of these are fairly obvious as a user of the language, but boy am I glad I don't have to parse that!