Clojure

OK. Consider me won over.
Lisp is great to work with. The things that grabbed me about FP in Erlang and Haskell (pattern-matching arguments, partial application, lazy evaluation) are all here.
My code is as concise as Erlang and damned nearly as concise as Haskell (I think the line count is similar though the number of characters per line is about twice as high)
Although I respect Haskell’s type system, Clojure’s dynamic typing holds me up less. I *am*, admittedly, hitting more problems that a type system would have picked up. (Far more than I typically hit in Python) but I think as I get more used to the language this will go down.
I’m not being particularly demanding in terms of libraries. (Quil is almost all the libraries I need at the moment.) But I’m finding that there are all these handy things like spit which make me smile. (Remember what this was like in Java?)
Things that would still be a bit fiddly in Python / CoffeeScript continue to turn out to be easier than I imagined they would be when I implement them in Lisp. That’s partly because I default to approaching them as “how do I write a small lambda that can then map across this list” and mostly, by the time I wrote that function, all I have to do is … er … map it across the list.
Lisp is extra-ordinarily compressible. I keep finding ways to refactor and fold up things I did earlier to make them shorter and shorter. And the more functionality I add to my program the more compressed it seems to get.
I am grinning to myself at the thought that my code might be compilable to both Android and into Javascript. I haven’t tried either yet, but if I manage it then Clojure is now my new favourite language.
CoffeeScript isn’t at all bad, but if ClojureScript works out, then I’ll probably start to move aggressively to use it as my default in-browser language. (And yes, I guess that may mean rewriting OWL in it. OWL is still short enough that I think I could sprint it in a couple of days.)
Similarly, if I can compile Clojure libraries that can be called from Java projects then you’ll start to see me more productive on Android. (Beyond OWLdroid I have a couple of other bits and pieces of apps. written, but not taken them to completion. If Clojure slots painlessly into the workflow, it will be a lot more tempting to dive back in.)
So … yeah … Clojure rocks!

Clojure Debugging

Has to be said that Clojure’s runtime debugging support is the worst ever. A call stack of irrelevant Java information and no idea which line of Clojure actually triggered the error.
At least with CoffeeScript you can look into the Javascript at the appropriate line-number and see sort of what it’s doing and then map that back to CoffeeScript manually.

Clojure / Quil

Having decided that this year was my Haskell year, I now find myself dabbling with … er … Clojure.

Why? Well, basically because of Quil which is a wrapping of the Processing library for Clojure. I need to do some Processing-like graphics, and I want to learn the FP way of doing it. Haskell would be great, but I’ve had a bit if hassle recently with trying to install some of its extra libraries so not I’m not so confident I can set it up as quickly as I need. Plus, Clojure / Processing also holds out a bit of hope I might be able to move what I’m doing to Android, which would be a bonus for what I’m working on at the moment.

So suddenly I’m back in Emacs. And writing Lisp as seriously as I ever have. It still looks somewhat verbose and cumbersome, especially compared to Haskell, but I’m finding that as I tweak and refactor, and get more familiar with the idiom, it starts to distil down to smaller and more elegant code. I’m enjoying.

Aaaargh! Quora. No! (Should I learn Clojure for Android programming?)

Having contrasted Quora, positively with StackOverflow, I find that Quora is also starting to play the “word-shaping” game by which either an algorithm or a tone-deaf moderator decides to constrain how you are allowed to express your questions 🙁
No idea why they really feel the need to do this. But it basically has the effect of driving out all personal voice, subtle context to your question, potential for jokes, creative wordplay, malapropism, coining neologisms or anything else that keeps language alive and a delight for the intelligent mind.
Here’s my original (rejected) question :

Should I learn Clojure for Android programming?
I’d like to get into Android programming. But every time I play with it, I find it full of that verbose Java bureaucraticality that we all know and hate.
I’d like to work with a nice modern, higher-level language. (I’m mainly using CoffeeScript / Python these days) So, would it be worth me learning Clojure to do Android programming?
By this I mean two things :
– can you write Android apps. in Clojure at all (is the tooling there?)
– does Clojure buy you anything in the Android world? Or will I still be making the same long sequence of imperative calls to the same Java libraries that I’d be doing in Java? Ie. for this kind of application there isn’t much “compression” in Clojure compared to Java

I’m not saying this is a great question. Or perfect example of writing. But it is MY question, the way I wanted to phrase it.

Update : Got into a certain amount of argument about this. (Partly because I’m complaining.)
Here’s what I found myself replying :

If people prefer not to answer the question, that’s their prerogative. No problem.
The point is, is Quora going to set a “maximum sophistication” limit on questions, so that people who are capable of understanding a question that requires three paragraphs to capture its full meaning, are nevertheless prevented from writing or reading such questions because Quora has decided that only single-paragraph questions are allowed?
I think that will be a catastrophic loss. For me because I like Quora. And, I think for Quora, because it will become a less interesting place to be. I’ve already seen this happen on StackExchange. A place where I used to hang out every day, but where I now spend as little time as possible.