CoolAJ86

Sunday, March 14, 2010

No, really, XML is retarded.

http://developer.apple.com/macosx/launchd.html

This way is better because... ???



That said, I don't think that every single program should have it's own psuedo-YAML config syntax. I like YAML, but would prefer that we all standardized on JSON.

key => "string"
value => "string" | {} | []
dict | map | hash => {}
array | collection => []
ASSIGN => :


This is what I don't like about XML:

It's ambiguous.
Which of the following is most "correct"?
<key>KeyName</key>
<value>Some value</value<
<keyname>Some value</keyname>
<keyname><value>Some value</value></keyname>
<keyname value="Some value"></keyname>
<keyname value="Some value"></keyname>

It encourages error.
It's just more likely that you'll get it wrong in a way that's not apparent at-a-glance.
<keyname>Some value<keyname><

It's ugly. Just look at it. It looks complicated.

It's verbose. Why do you repeat the names of every single key thing


Consider a JSON representation:
{ "key_name" : "Some value" }

Clear.
Concise.
Correct.
Cute.