4 ms·
> Anchors are just pointers. > That's why it has complex keys. Yes. And it leads to exploits or errors. The dumber the serialization format, the better. JSON
by Ygg2 2y ago
> Anchors are just pointers.
> That's why it has complex keys.
Yes. And it leads to exploits or errors. The dumber the serialization format, the better. JSON has thrived without these mis-features. And most stuff I've seen in the wild doesn't use the exotic features anyway.
The format user should worry about converting nodes to references, and complex keys are something few users ask for.
- xelxebar 2y ago> it leads to exploits or errors You are blaming implementation failures on the language design. That's kind of my whole gripe. Instead of wasting cycles on inventing new languages, I wish we'd pool resources into fixing libyaml. > most stuff I've seen in the wild doesn't use the exotic features anyway Mostly due to lack of awareness. Ruby, Python, JavaScript Rust, Java, etc. all allow mostly arbitrary objects for keys. It's only confusing if you conflate dictionaries/maps for objects. In the scientific computing community, it's not unheard of to see lists as keys in YAML documents, which is really convenient if that serializes to exactly the data model you're working.