i love s-expressions, but they have closing tags, so to me they are precisely not what the parent example shows. i prefer writing html with closing tags because then i can use any xml parser and my editor can jump from opening to closing tag and back.
Well, sorta. XML style syntax already has open and closing marks for the tags. They just additionally have marks for the end of non-attribute children. s-expressions not having that is still a win.
yes, s-expressions are a win (that's why i love them) but i don't see the xml structure that way. for me the tags themselves are very elaborate opening and closing markers. that's simply how i perceive it. if a closing tag is missing when there should be one, the structure looks broken to me.
the example s-expression matches that structure and i perceive it as the same because the first element in any list has a special meaning (in lisp itself it is the function name, while the rest are arguments)
to replicate the html5 structure in the top comment without closing tags as s-expressions i would come up with something different:
(table
(tr)
(td) one
(td) two
(td) three
(tr)
(td) another table
(td) with more stuff)
I think I see your point, but it feels weird to see this form, to me.
To your point, I can see the opening tag as ( and the closing as ), but then that would lead to something more like:
(table
(tr
(td one
(td two
(td three
(tr
(td ...
Which really just highlights how odd it is to see the opening tags without the closing ones. Which probably goes a long way to explaining why I don't like it. :D
Probably more natural to have something like:
(html
table
tr
td "one"
td "two"
tr
td "...")
In this way, you could optionally have the closing tags of /td and such. Still looks very weird to me.