| ▲ | dragonwriter 18 hours ago | ||||||||||||||||
> HTML (and XMLish syntax in general) is LISP syntax (not semantics) in disguise No, its not. If it was, the attribute vs. child element distinction would not exist. HTML (and HTML-inspired XML) syntax is not a trivial alternative to S-expression syntax, it is more complex with additional distinctions. A simplified subset of (HT|X)ML that uses only elements and no attributes is pretty much directyl equivalent to S-expressions, sure. | |||||||||||||||||
| ▲ | shakna 4 hours ago | parent | next [-] | ||||||||||||||||
Every Lisp I know of has SXML either baked in, or as a library because it absolutely can represent the fullness of HTML...
Becomes:
https://www.gnu.org/software/guile/manual/html_node/SXML.htm... | |||||||||||||||||
| |||||||||||||||||
| ▲ | embedding-shape 17 hours ago | parent | prev | next [-] | ||||||||||||||||
> A simplified subset of (HT|X)ML that uses only elements and no attributes is pretty much directyl equivalent to S-expressions, sure. Add one more type, like a map, now you have attributes | |||||||||||||||||
| ▲ | npn 10 hours ago | parent | prev [-] | ||||||||||||||||
Have you ever tried parsing html in s-expression languages before? For example, in elixir parsing html is this syntax: `{html_tag, attributes, children}`. You indeed can include attributes in s expression | |||||||||||||||||