
Python’s Valentines Day Gift to Clojure - sunng
http://sunng.info/blog/2012/02/pythons-valentines-day-gift-to-clojure/
======
ericmoritz
I have to say, after tinkering with Clojure, when I'm typing out a python dict
or list I think, "So many damn commas..."

~~~
atdt
Try this:

>>> dict(user='root', password='secret') {'password': 'secret', 'user':
'root'} >>> "marry had a little lamb".split() ['marry', 'had', 'a', 'little',
'lamb']

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

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>

------
csears
Was it purely coincidence that this was posted the same day as PyClojure?
<http://news.ycombinator.com/item?id=3589374>
<https://github.com/eigenhombre/PyClojure>

------
dustingetz
why do people want to do this?

~~~
zaphar
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.

~~~
dustingetz
XML and Json are much more mature ideas for data sharing.

edit: google results for:

    
    
      "python xml" : 359,000
      "python json" : 48,600
      "python s-expression" : 5,440

~~~
acuozzo
> 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.

~~~
andrewflnr
You probably don't need a citation to know that s-expressions have been around
much longer than XML or JSON, for what that's worth.

