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.
Comments are closed after 13 days.