2 ms·
The comment you were responding to got deleted, which makes it a little hard to figure out what's going on there. But I am completely nonplussed at your assert
by lisper 12y ago
The comment you were responding to got deleted, which makes it a little hard to figure out what's going on there.
But I am completely nonplussed at your assertion that markup and serialization are mutually exclusive. There is a 1-to-1 correspondence (actually multiple 1-to-1 mappings) between XML and S-expressions, so whatever you can do with sexprs you can do with XML modulo some trivial transformation. The ONLY difference is in the amount of punctuation and redundancy.
> the distinction between strings and symbols is important
Yeah, that's a good point.
> neither XML nor JSON has it
That's not quite true. It's not that JSON doesn't have symbols, it's that Javascript doesn't have symbols. And XML doesn't have symbols natively, but you can easily gin them up yourself, e.g. <symbol>foo</symbol> or <symbol name=foo />.
- ScottBurson 12y agoObviously you can encode S-expressions in XML (including symbols). But you have to add additional structure to do it. The point is that XML, following the markup metaphor, doesn't work this way out of the box. And, in fact, I've never seen anyone (except, I guess, you) go to the trouble of making all the distinctions in XML, such as the string/number distinction, that S-expressions make -- and I have seen people get into trouble for failure to do this. It's a psychological/sociological point rather than a technical one, but metaphors matter in design.