|
|
|
|
|
by arb
6120 days ago
|
|
It's unnecessarily ugly. There's a lot of unnecessary state, where refs are initialized to nil, then only updated to a fixed value. There's side effects in transactions (mostly around the Timer). Not one function is defined with parameters, which ought to raise alarms. The flow resembles Java code rewritten in Clojure, rather than a functional Clojure program. Besides that, much of the code is either non-idiomatic or primitive: the 'ns' macro should be used instead of 'import'; 'alter' can be better than 'ref-set'; 'when' is better than 'if' without an else form; the proxy identation is wrong. The AWT/Swing interaction is excusable, as is the poor readability given the brevity constraint for this exercise, but there are still some elementary problems. |
|