6 ms·
Clojure Hills of Abstraction
- thurn 15y agoUnderstanding syntax is a very small part of understanding a programming language. It takes a long time after you've grasped the syntax of a language to begin to understand its idioms and best practices. A talented programmer can pick up a new syntax in a few weeks, picking up a new paradigm takes much longer. The primary obstacle in learning both Clojure and Scala, I would say, is understanding the functional programming paradigm. In that sense, they're not so different.
- ataggart 15y agoThis is precisely what I pictured for clojure when reading fogus' post on scala. Coming from a java background with no lisp experience I did not find clojure syntax "difficult". Any difficulty was, as Alex noted, in not doing things the imperative way. If anything, the fact that the language got out of my way allowed me to focus on writing functional programs. It's also worth noting that learning new ways to solve problems is fun; learning reams of new syntax is not. It's for this reason that I became frustrated when trying to learn scala after working in clojure for a while.
- lightcatcher 15y ago>It's also worth noting that learning new ways to solve problems is fun; learning reams of new syntax is not. This is very true. Clojure was the first functional language I learned, and it was actually a ton of fun have to figure out basic things (like writing the fibonacci sequence) in a functional style. Also, Clojure introduced me to concepts I hadn't learned about with my bit of Java experience and moderate Python experience, such as lazy sequences, tail call recursion (and way more recursion in general), STM, and macros. Even though I don't write clojure very often (and not as much as I would like to), I'm still glad I took the time to learn the language just because it introduced me to so many new concepts.
- sreque 15y agoFor me a major hill to overcome for learning any Lisp is Emacs. I've used Vim all my life, but I haven't found any way to make it "S-expression aware" the way emacs is. In emacs, I can navigate and manipulate the code based on S-expressions. I can move, cut, and select up, down, left, and right. In DrRacket I also know how to do things like rotate s-expressions and move an s-expression outside. Since I've always felt that Vim is inferior for Lisp development, I try to use Emacs. Unfortunately, I feel a million times slower in Emacs than Vim simply because I've used vim for years. I feel like, if I wanted to feel comfortable coding in any Lisp, I would have to code non-stop in an Emacs-like environment for a year, and I haven't had the discipline to do that yet. Does anyone know how to make Vim comparable to Emacs in this regard?
- swannodette 15y agoVimClojure, http://www.vim.org/scripts/script.php?script_id=2501 http://www.vim.org/scripts/script.php?script_id=2501 slimv, http://www.vim.org/scripts/script.php?script_id=2531 http://www.vim.org/scripts/script.php?script_id=2531
- irahul 15y agoVimClojure doesn't have any s-expr manipulating shortcuts, does it?
- lukeschlather 15y agoHave you played with viper-mode?
- sreque 15y agoI had a co-worker once that used Emacs and would always enable viper mode for me when I came to help him on his computer. Every time I used it, I always managed to break it or expose some way it didn't work! It left me with a bad impression, but I guess I could give it a try again.
- 15y ago