"I don’t find that using Clojure making the overall process of writing new code faster. My thinking/typing ratio is much higher though. I think the reason is that I have a huge confidence in Java refactoring tools and my abilities to morph the code towards where it should go. In Clojure, if you start writing code there is no ceremony and within two minutes you realize that your first idea was dumb and your data structure should be totally different and it drives you back into the thinking phase."
I'm not sure that convinces me to try Clojure. To me less typing is great, but only if it still makes sense and I don't have to come at it a few ways before I get it right. That is probably why I never took to Perl. It just looks like garbage and I couldn't get past that.
> I don’t find that using Clojure making the overall process
> of writing new code faster
He's talking specifically about writing _new_ code. I think the implication here is that Clojure encourages more consideration up-front, resulting in designs that are easier to modify down the road.
Given how much time is spent maintaining code vs writing new code this seems like a reasonable trade-off.
I find that with a REPL in hand, I tend to play with functions while letting my mind almost drop into the problem space.
So I do less up-front design, but wind-up with somewhat better code at the end.
The other weird effect is that I find that this helps me think better about coding in something like C as well. A little experimentation at the REPL helps me understand pieces of the solution better.
I think part of it is that you have a higher reimplementation rate for your code in languages like Clojure. If something takes you 3 hours in Java and you find its a crap design, you might take 15-30 minutes to figure that out in Clojure.
It has the side-effect of teaching you to think through your ideas more (wait, I thought we were supposed to avoid side effects! ;) )
I think the point is that less ceremony makes it feel like less progress is being made, but actually it's equivalent. Information density is much higher compared to java, but the programmer is still rate-limited himself, so his brain will work at the same rate. The benefit would show up in time spent reading and in higher signal/noise as you don't have to spend brain cycles dismissing boilerplate. It's not as big a boost as say garbage collection vs no garbage collection, but still notable. I think clojure's immutability story reduces cognitive load quite a bit on its own. Also, I don't think clojure has the craziness of perl, but I've never used perl. It's pretty easy to read, IMO.
Lol! For the first time ever I ran across a reasonably sized perl based project where I actually understood and could read the flow of things and I've written plenty of perl many ages ago. (even that god awful object oriented style perl they made me use at bellatlantic for "Watson" )
Never had any issues playing around with or reading others emacs lisp macros though. After the initial within within brain fuck part is over at least.
I hope that you wouldn't try Clojure because it features less typing. That's not the point, merely an observation. The reason to try Clojure is that it allows you to easily create powerful abstractions that are not intertwined. You get less typing as a bonus. :)
I'm not sure that convinces me to try Clojure. To me less typing is great, but only if it still makes sense and I don't have to come at it a few ways before I get it right. That is probably why I never took to Perl. It just looks like garbage and I couldn't get past that.