4 ms·
The thing is if you're using it as configuration language, object notation is correct, not markup.
by throwawaymaths 3y ago
The thing is if you're using it as configuration language, object notation is correct, not markup.
- taeric 3y agoI'm curious why you think that is? Especially since you are likely to want to style the configuration for display to the user in many cases, having it be a document makes a lot of sense. That is, if the value is something you would expect to be able to show to a user, then it probably shouldn't be at attribute. If it is a value that changes how you would show it, then attribute makes a lot more sense. I also think a strong adherence to any preference between attribute and markup is a touch too dogmatic. The only real distinction at the language level is if you allow children, or not. If it can have children, it pretty much has to be a child and not an attribute.
- throwawaymaths 3y agoOk forget the difference between attribute and markup. What is the "right" way to think of this: <foo> <bar>1</bar> <bar>2</bar> <baz>3</baz> <baz>4</baz> </foo>
- taeric 3y agoWhy do you think there is a "right" way?