13 ms·
You're talking about something like, but not exactly, choice paralysis? It's possible that's part of what's going on, but... I don't think so. Or, not so clean
by RangerScience 10y ago
You're talking about something like, but not exactly, choice paralysis?
It's possible that's part of what's going on, but... I don't think so. Or, not so cleanly. YAML options aren't choices, they're things you can do if you end up wanting to.
This is a theme in Ruby (and then Rails) programming. There's a bunch of stuff you can use, but you don't have to, and probably won't. There's an effect there, but it's not the same as choice paralysis.
--
I don't see what you see - that YAML was designed with the idea that options are intrinsicially valuable - it said, "Here's a thing to do. What's the simplest way to do this?".
Well-executed simplicity leads to options - think grep. There's a bunch of options when using grep, but really, it just does the one thing... but then there's a bunch of ways to use that one thing.
Again, this is a Ruby thing. There's more than one way to do it because there's more than one situation in which you'll need to. Have a simple array? Brackets. Have a not simple array? Dash.
In either case, it's pretty much the simplest way to do it, but one doesn't work (as well, or at all) for the other situation.
- jerf 10y agoThis is one of those duality things that comes up so often in programming and math: What is optional from the point of view of the user of the format is mandatory from the implementer's point of view. Pointing out that it's optional for the user does not remove the additional complexity the implementer must pay. YAML is a lot more complicated than JSON, and it's not all different ways of spelling the same thing (which is a sort of complexity that at least isolates itself to the parser), it's genuinely richer and more complex, and that price gets paid by somebody. Focusing on the one not paying that price doesn't make it go away. Further, "YAML is not as popular as JSON" is an observational fact, not something we can argue away. It's worth trying to figure out why and learning what we can from it. I've made my proposal. There are other options ("Javascript is a steamroller"). But I'm not really a big fan of the evergreen "other people are just too stupid to see the obvious truth" explanation, which is generally the one that seems to be given to explain why YAML hasn't beaten JSON. That explanation is almost always wrong. (Only almost, though.)
- RangerScience 10y agoHmm. I think I see what you're saying. You're saying that the popularity of JSON is directly related to the popularity of implementing JSON, which is due to the simplicity of it's implementation, as compared to YAML. This seems somewhat reasonable, but I don't think it can cover everything.