Clojure is a general-purpose language supporting interactive development that encourages a functional programming style, and simplifies multithreaded programming.

learn more… | top users | synonyms

15
votes
6answers
3k views

Best practices in comment writing and documentation

Commenting nowadays is easier than ever. In Java, there are some nice techniques for linking comments to classes, and Java IDEs are good at making comment shells for you. Languages like Clojure even ...
24
votes
4answers
3k views

What limitations does the JVM impose on tail-call optimization

Clojure does not perform tail call optimization on its own: when you have a tail recursive function and you want to have it optimized, you have to use the special form recur. Similarly, if you have ...
21
votes
7answers
5k views

What's your reason to learn Clojure? [closed]

I got a personal question for you guys out there: what's your reason for learning Clojure ? (For me, it's the same thing as it was with Java over C, it promises a better programming experience)
6
votes
1answer
403 views

How to refactor a Java singleton to Clojure?

I'm writing a simple game in Java and I want to learn Clojure, so I've decided to refactor my current Java code to Clojure. The problem is that I've coded so much in object-oriented languages that I ...
4
votes
1answer
283 views

Is re-defing idiomatic in clojure?

Simple example: (def ticks 0) (defn run-iteration [] (def ticks (inc ticks))) Though the usual case involves things that don't change more than once every several hundred ms. How to do this ...