It's a way to share data with a clojure application. And s-expressions are a pretty good format for data transfer so it's not a terrible idea to provide ways for people to use it as such.
> XML and Json are much more mature ideas for data sharing.
How're they more mature than s-expressions? I don't think everything needs citations, but I'd like to see some supporting evidence for this particular claim.
Why are "google results for python %s" a useful maturity metric here?
A better argument would have been showing that both xml and json can be parsed/generated through standard Python libraries. S-expressions don't support this behavior.
I didn't say mature I said they were a good format for it. And by what metric are you measuring maturity?
* Age? s-expressions predate python by a fair amount.
* Parsers? just about every language I know has a lisp
interpreter embedded in it. s-expressions therefore
have
parsers in pretty much all languages.
* Market Share? well xml and json may win there but I'm
not sure that's a valid reason to discount
s-expressions
Some (potential) context to this is that at Clojure Conj there was a discussion of the potential for clojure expressions to become a standard data serialization format. The idea is that clojure data is significantly more rich than something like JSON.
14 comments
[ 5.4 ms ] story [ 41.8 ms ] thread>>> dict(user='root', password='secret') {'password': 'secret', 'user': 'root'} >>> "marry had a little lamb".split() ['marry', 'had', 'a', 'little', 'lamb']
If you like clojure and must program in python, have an idea of how to implement something in clojure but not in python then just use clojure now.
edit: google results for:
How're they more mature than s-expressions? I don't think everything needs citations, but I'd like to see some supporting evidence for this particular claim.
A better argument would have been showing that both xml and json can be parsed/generated through standard Python libraries. S-expressions don't support this behavior.
In fact, as I understand it, some of the changes to the reader in 1.4 are aimed at working on this goal. You can read a little about this at http://dev.clojure.org/pages/viewpage.action?pageId=950382