3 ms·
Mark has the "}}}}} problem with larger documents, so it is not as suitable for human-written markup. And HTML has a problem of </span></li></ul></div></div></
by phoe-krk 9y ago
Mark has the "}}}}} problem with larger documents, so it is not as suitable for human-written markup.
And HTML has a problem of </span></li></ul></div></div></div></div></body></html>, all spread over nine different lines, one tag per line.
Take a look at https://github.com/keithj/alexandria/blob/master/definitions.lisp#L24 https://github.com/keithj/alexandria/blob/master/definitions... which is Lisp code styled in a standard manner. I don't see any problem there.
- henryluo 9y agoHTML has the problem of </div></div></div></div></div></div></div>. Lisp has the problem of '))))))))'. JSON has the problem of '}}}}}}'. And YAML has the problem of deep indentation. When it comes to worse-case scenario, no one wins. :-(
- olavk 9y agoThe HTML example is much better than "}}}}} though, since you can e.g. add a new item at the end of the list without needing a specialized editor to locate the right position. This is one of the reasons for the redundancy in repeating the tag name in the end-tag. In theory Lisp should have the same problem, but usually code (hopefully) rarely have nested blocks larger than a screen, so it is not a big issue in practice, even if )))) looks ugly. Bottom line is code have a different structure than typical hypertext documents, so just because a notation is suitable for one does not mean it is suitable for the other.
- henryluo 9y agoBut when s-expression is used to represent document, not a program, then it is also not free to refactor deep nested content. So s-expression is no better than XML/HTML/JSON/Mark when encountering deep nested content.
- olavk 9y agoIt is exactly the same as Mark, but I am arguing it is worse than XML/HTML for these scenarios.
- phoe-krk 9y agowithout needing a specialized editor to locate the right position Paren-matching is a commodity today in all sane programming editors. It is no longer anything you could call "specialized".