| > Not only is he wrong, he's clearly wrong. You keep repeating that, but the more you discuss it, the less "clear" it is. > I don't understand your question. You acknowleded that we need to have a specification in order to make sense from a piece of markup. When we know what elements are to be expected in a format, what "clear" and "useful" advantage gives an additional arbitrary syntactic separatation over a sub-element-only layout? and why is it more "reasonnable" to have this separation when it actually make it slightly more difficult to manipulate the data? > My claim is that, in the context of markup languages, there is a useful distinction to be made between data and metadata, ... Originally, attributes made sense "in the context of markup languages" because attributes were metadata and sub-elements where "content". This is a reason why Naggum was first favorable for the distinction. But then the line was blurred, because not everything is so simple and you find attributes that refer to "data" (title attribute) and sub-elements that refer to "meta-data" (<meta> tag, for example). > (foo [baz bar] bind)
> ... you could tell that ... BAZ was a variable binding without having to know how FOO was defined. It's not a slam dunk, but it is a defensible position. You don't need to know how FOO was defined, but you have a contract with FOO: there are many other distinctions one could make (not only bindings/parameters): will you invent a new syntax for everyone of them? Is that really useful? XML is used when you don't want to have a complex syntax and when a standard AST suffice. And then, attributes are an added complexity with little benefits. |
It syntactically distinguishes information that applies to the tag from information to which the tag applies.
> why is it more "reasonnable" to have this separation when it actually make it slightly more difficult to manipulate the data?
It's a tradeoff, of course. Reasonable people can disagree about whether the tradeoff is worth it. But that's my point: reasonable people can disagree.
> But then the line was blurred
Any language feature can be abused. The proper response IMO is to stop abusing the feature, not to eliminate it.
> will you invent a new syntax for everyone of them?
I don't know. What other kinds of distinctions did you have in mind?
> attributes are an added complexity with little benefits
I understand that you believe this. Do you see how a reasonable person might disagree?