I'm learning Clojure and having fun with it. I never learned a Lisp in school like many programmers my age did. The one variant I did try, about 15 years ago, was Scheme. I did a little Gimp scripting with it but nothing else. I think I had to mature a bit before I could appreciate the Lisp style for what it is.
For a language that's designed to be more simple than easy, it's surprisingly easy to use Java classes in Clojure. This is the first code I've written using JTS classes in a while.
user=> (.buffer
(.read (com.vividsolutions.jts.io.WKTReader.) "POINT (0 0)")
1.0)
#<Polygon POLYGON ((1 0, 0.9807852804032304 -0.1950903220161282, ...))>
I assumed I'd have to write something like a Python C extension module to do this and am thrilled to be wrong.
I remember you mentioning this, Mike. So much less complicated than ctypes, Cython, etc.
Comments are closed after 13 days.
1Re: Notes on learning Clojure
Michael Weisman, 2012-01-25T19:42:05Z
One of the great things about alternative JVM languages is how simple it is to use existing java libraries. I managed to get JTS talking to Google Refine through the Jython query interface without having to write any wrappers.