by lamacase · 11y ago · 0 comments
You are correct that:
<foo bar="zot">quux</foo> => (foo (bar "zot"))
<foo><bar>zot</bar></foo> => (foo (bar "zot"))
Is an ambiguity. However in his <|> syntax: <foo bar="zot">quux</foo> => <foo <bar | "zot">>
<foo><bar>zot</bar></foo> => <foo | <bar | "zot">>
What about, say: <foo bar="zot">quux</foo>
as (foo (bar "zot") (data "quux"))
Or any other keyword which you could reserve as being the special "non-meta" data? (foo (bar "zot")) is then unambiguously <foo bar="zot"/>
(foo (data (bar "zot"))) is then <foo><bar>zot</bar></foo>
I'm not sure whose side I'm on by proposing this. I'd be interested to know."Whether something is an attribute or element is _completely_ arbitrary."
THAT is the point on which he is (IMHO) clearly wrong. (He's wrong about a bunch of other things too, but that's the most serious mistake.)
EDIT: Here is Erik doubling down on his position:
"I have a simple way to get rid of the annoying verbosity of these stupid languages while _retaining_ that mistake [sic] between attribute values and elements"
He does not appear to make an argument as to why he believes this, so I'd say his claim is at worst unsubstantiated.
I find it hard to believe that there's a objectively correct decision about the number of semantic concepts that "should" be encoded in a syntax, but I can understand why lisp enthusiasts would be on the 'closer-to-none end of that spectrum.
I'd be interested to hear why you think it's so essential. The only argument I'm really aware of is compatibility with existing markup languages.
I would guess that a markup syntax that is as simple and regular (ie. syntactically consistent) as possible would be the easiest to operate on algorithmically. I would also guess that this would make it easier to build, on top of this language, tools which present the content in various ways that are easier to read/write/manually-manipulate if you so desired.
Actually, his example syntax makes this argument implicitly. He is suggesting that his tools are significantly easier to implement by working with plain S-Expressions, and that they can easily be mapped to a 'write-friendly markup language that is isomorphic to XML anyway.
I make no claims about the quality of his presentation or the clarity of his arguments.