4 ms·
You're assuming the use of attributes for everything, though. The thing that irritated me immediately about XML is the arbitrariness of having both attributes a
by DidYaWipe 2y ago
You're assuming the use of attributes for everything, though. The thing that irritated me immediately about XML is the arbitrariness of having both attributes and sub-elements.
- cdrini 2y agoYep that can be confusing at times! Although I've found SVG to be pretty predictable with regards to this.
- mort96 2y agoThat's inherent in anything which represents a tree of nodes though. The nodes themselves have a set of attributes, and they have a list of children. JSON has the exact same "problem" if you choose to represent a tree of nodes as JSON with a "children" field which is an array of sub-nodes. This isn't an issue if you use S expressions, simply because S expressions get rid of the concept of properties. But at that point, you end up with a rectangle with a sub-node called "width", which feels weird as well: the width of a rectangle is clearly a property of the rectangle, not a "child" of it? I'd argue that using S-expressions where each rect node must have x/y/width/height children is just a poor attempt at adding back properties to a syntax which doesn't natively support it.
- DidYaWipe 2y agoDecent argument. But... I don't find making properties into sub-elements a problem. At least I didn't, until you brought it up. Ya bastage!