33 ms·
What's the problem with that? If it's deeply nested, then it's deeply nested, no matter what.
by joesb 12y ago
What's the problem with that?
If it's deeply nested, then it's deeply nested, no matter what.
- byuu 12y agoIt's pedantic, but it's a tad clunky now: I'd use something like "wow/such/deep[3]/much/power/!" to differentiate child nodes from array indexes, and also strongly advise against a node named "!" on principle. Of course then you'd say "but I want '/' in my node name!", and then you get to bikeshed an escape sequence, but you'd need that anyway for a node name with '[' or ']' in it. However, what they've done is workable if all the browser vendors implement it.
- stephenr 12y agosquare brackets are a reasonably common way to access data in an hash-like object. both Javascript (objects) and PHP (associative arrays) use/allow square brackets for this.