Indeed. Learning functional programming in any language is a major jump for those of us (pretty much all of us?) who started out with imperative languages. It's ultimately very rewarding, but plenty of work in addition to mind stretching.
Then again you probably should have listened to all those people telling you to do The Structure and Interpretation of Computer Programs (SICP/6.001) ^_^, I merely lucked out to be at the edge of the community that created it, so it sort of fell into my lap, with strong recommendations that "this is revealed truth" as I like to put it.
To give but one example, if you're having any trouble with loop/recur, do the exercises on recursive functions that implement iteration without stack growth through tail recursion (the latter a feature that's unfortunately not available in the JVM; the flip side is that recur isn't going to blow your stack).
In the last couple of weeks I had to write a bunch of those in Clojure for the first time "in anger" (for real), and that part of it was trivial because of the SCIP I'd done in the early '80s. Learning that and pounding in my head for the first time was a bit hard, but well worth it, back then and of course now.
Comments
Indeed. Learning functional programming in any language is a major jump for those of us (pretty much all of us?) who started out with imperative languages. It's ultimately very rewarding, but plenty of work in addition to mind stretching.
Then again you probably should have listened to all those people telling you to do The Structure and Interpretation of Computer Programs (SICP/6.001) ^_^, I merely lucked out to be at the edge of the community that created it, so it sort of fell into my lap, with strong recommendations that "this is revealed truth" as I like to put it.
I catch up on the SICP :)
To give but one example, if you're having any trouble with loop/recur, do the exercises on recursive functions that implement iteration without stack growth through tail recursion (the latter a feature that's unfortunately not available in the JVM; the flip side is that recur isn't going to blow your stack).
In the last couple of weeks I had to write a bunch of those in Clojure for the first time "in anger" (for real), and that part of it was trivial because of the SCIP I'd done in the early '80s. Learning that and pounding in my head for the first time was a bit hard, but well worth it, back then and of course now.