26 ms·
The argument that XML can have various different structures for storing a person's name, while JSON provides one simple solution, doesn't fly. You could run int
by ntownsend 17y ago
The argument that XML can have various different structures for storing a person's name, while JSON provides one simple solution, doesn't fly. You could run into something like
{
"Person": {
"property": {
"type": "first-name",
"value": "John"
},
"property": {
"type": "last-name",
"value": "Smith"
}
}
}
This begs the question, "Why would you do something that convoluted?" Well, you can ask the same of the XML examples, and the answer probably boils down to requirements (or incompetence?).
- wlievens 17y agoOr library defaults. X-Stream, for instance, will by default use subtags rather than attributes, for primitive properties.
- arockwell 17y agoMy gut feeling on this is that almost anyone can recognize that writing JSON like that is wrong. However, trying to determine if <person first-name="John" last-Name="Smith" /> is better than <person> <first-name>John</first-name> <last-name>Smith</last-name> </person> is often very difficult. In the wild, I've seen both strategies used depending on the situation.
- yread 17y agoActually it's very simple. If you don't need children don't make them. I measured it once and storing stuff in attributes had ~10 times faster parsing in MSXML.
- JeremyStein 17y agoPlease don't write "begs the question" when you mean "raises the question". http://begthequestion.info/ http://begthequestion.info/
- stanleydrew 17y agoBut if we know what he meant why does this matter? Language exists to convey meaning, and I think we all understood what he meant, so I don't see the problem here.
- sjs 17y ago"I know this sounds like a semantic quibble, but words mean things." -- unknown
- loup-vaillant 17y agoThe problem lies in dilution: if people recognize a new meaning in an old phrase, it becomes more difficult to convey the old meaning. (Because you can't use that phrase any more.) There is also the case where you thought you conveyed the new meaning, while it hasn't caught on yet (meaning, you made a mistake). So, better stay safe and stick to the old meaning while we can.
- vidarh 17y agoThe dilution has already happened, and this cause is pretty much lost. English is my second language. I've known the "new" meaning since I was a kid. I've to date maybe seen the "old" meaning used a handful of times other than in examples given by people trying to correct someone using the new meaning. Outside of academia I'd be surprised to see it at all. I suspect it would be confusing to more people than would recognize it.
- loup-vaillant 17y agoOK for this particular cause. I was more about a general stance: trying to slow down the rate of change in languages. The slower the change, the less confusing the language.
- Confusion 17y agoThe dilution has already happened, and this cause is pretty much lost. Don't give up too easily. Outside of academia I'd be surprised to see it at all. That's because it's originally an academical term for a logical fallacy. This is like the abuse of 'eigenvalues' by all kinds of crackpots and we should never stop fighting that kind of language abuse. We can't keep inventing new terms, just because others have hijacked the previous one.
- ntownsend 17y agoWhoops. You're right. I'm embarrassed because I do know the difference.
- dasil003 17y agoI respect the difference, but I'm afraid there's not much point in trying to educate people. This has already been an utterly lost cause for decades (at least).
- sfk 17y agoThe Oxford Dictionary lists "raises the question" as a valid interpretation of the phrase.
- deleted 17y ago[deleted]