Hacker News new | ask | show | jobs
by ntownsend 5932 days 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?).

3 comments

My 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.
Actually 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.
Please don't write "begs the question" when you mean "raises the question". http://begthequestion.info/
But 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.
The 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.

The 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.

The 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.

The 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.

OK 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.
"I know this sounds like a semantic quibble, but words mean things." -- unknown
"But 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."

I often don't know what the user meant. It makes for extra work to stop and think what possible meaning was intended. Some thing when people use "less" for "fewer". I have to think, did they mean "lesser" or "fewer"?

I 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).
Whoops. You're right. I'm embarrassed because I do know the difference.
The Oxford Dictionary lists "raises the question" as a valid interpretation of the phrase.
Or library defaults. X-Stream, for instance, will by default use subtags rather than attributes, for primitive properties.