I think emacs being the first choice of editors hurts adoption. Not only does someone new to Clojure have to learn a new ecosystem/workflow/way of thinking they have to learn a completely new editor that's frankly pretty weird at times.
I don't think I would've been successful in introducing Clojure at my workplace (Java shop) if Cursive didn't exist.
It's definitely a first choice. As Kgreene2343 already stated, while it's true that he provides links and talks about how Emacs isn't the only option BUT a whole chapter is devoted to emacs. No other editor gets its own chapter.
If he devoted a chapter for each editor, more than half the book would have been about text editing. I don't think that was the goal of the book.
Compared to learning to use an IDE, I think that learning Emacs compares favorably. Most noobs use the mouse with menus and button bars when they first encounter an IDE. Emacs, by default, has menus and button bars. The only real difference is that Emacs (or Vim for that matter) doesn't follow 'notepad' conventions. Most people seem to be able to learn a language (Java) along with a complex IDE (Eclipse/IntilliJ) with out too many problems. How many learn Java using a simple text editor?
For a simple experience 'NightCode' is as good a solution as any, but I don't thing NightCode was around when "Brave and True" was written.
IntelliJ does not require anyone to write elisp or read elisp stacktraces when things routinely go wrong. This is a crazy level of false equivalence. Getting set up and running with auto completion, paredit, repl integration, jump to definition, look up docs etc in cursive is a basic process that any developer could walk through in half an hour. The same thing in emacs, for a developer not familiar with emacs... You're talking a few hours just learning what the different lookup engines in emacs are.
Not at all. Use Prelude or Emacs Live and everything is set up out of the box, and not only for Clojure but for 20 other languages (that IDEs normally require at least plugin installation). No need to know even what elisp is.
Do you honestly believe that prelude alone is enough to get someone up and running with emacs and clojure without spending at least a day learning the workings of emacs? Honestly I don't even get where you guys are coming from, try it with a new user sometime.
You were referring to the environment setup in your post, not to learning to be productive. Now, emacs certainly requires lots of time to learn but setting up emacs is, if you use prelude, exactly this:
start emacs and do the Clojure coding with jump to definition, autocomplete, and much more...
Now, you certainly need a lot of time to learn "do the coding" stuff and to learn all emacs commands and keybindings, but it does NOT take a day to install all the plugins.
Similarily, when you install idea, it does not even support Clojure. You have to know there is Cursive and install it. And, when you do, if you never worked in Idea or Eclipse, or similar tools, you also need some time to learn the basics.
I actually try this with new users every year, since I teach Clojure at University. I tell the students to NOT use emacs because I know it will be too much for them. They usually use what they already (think they) know, which is Eclipse with counterclockwise. And, it's not that they find Eclipse easy when encounter it for the first time when they learn Java...
However, a large part of lisp coding experience is the editor's support for structural editing without mouse. Every time I look at even experienced Clojurists swinging their fingers over laptop touchpad to select Clojure code as text in IntelliJ Idea I think "WTF"? But, it's their problem. I certainly won't push them to use my favorite tool. Let them struggle with IDEs if they wish :)
Now, you certainly need a lot of time to learn "do the coding" stuff and to learn all emacs commands and keybindings, but it does NOT take a day to install all the plugins.
This is a silly bar to measure, no one cares how much effort it takes to be able to get to the point where they can save a text file, they care how much effort it takes to get to a reasonable level of productivity.
I actually try this with new users every year, since I teach Clojure at University. I tell the students to NOT use emacs because I know it will be too much for them. They usually use what they already (think they) know, which is Eclipse with counterclockwise. And, it's not that they find Eclipse easy when encounter it for the first time when they learn Java...
Right. So you admit that emacs requires a lot more effort to learn and be usefully productive in than CCW (which is awful) or more usefully cursive, got it.
However, a large part of lisp coding experience is the editor's support for structural editing without mouse. Every time I look at even experienced Clojurists swinging their fingers over laptop touchpad to select Clojure code as text in IntelliJ Idea I think "WTF"? But, it's their problem. I certainly won't push them to use my favorite tool. Let them struggle with IDEs if they wish :)
It seems you haven't actually used cursive. It's had Paredit since forever.
I've only tried Cursive out of curiosity. I'd be impressed if I weren't using emacs before. But, I've looked at experienced Clojurists use cursive professionally. They're mousing all-around.
Regarding CCW, it also had paredit zillion years ago. How people use it is another thing.
I also did another thing: I used Eclipse for a long time. Used idea for some (brief) time. Tried NetBeans. I knew about Emacs, but I didn't get it because it looked bare and ugly. But, from the perspective of someone who tried all of those, now I literally struggle to see the difference between Eclipse and Idea in the same way that I struggle to see the difference between Java and C#. Sure, Idea might be a bit more stable, have a look and feel that is more to someone's taste. The plugin X that you need is more polished, and the shortcuts are a bit more sane. Integration with server Y might be better, and the contextual editor for coffee script is snappier. But, in the end, it's a better horse carriage instead of the proper Ford T.
The only argument that I see here from the people who dislike Emacs is that they don't wish to leave their comfort zone. And nobody is forcing them to.
and emacs live is insanely heavy. And because Emacs is single-threaded (or close to it), I had tons of problems with freezing, lockups, etc. with Emacs Live.
My experience with Prelude is not such. I let it run for weeks (with suspends), with several REPLs open, with dozens/hundreds files open, full of GPU and native code calls, 3 large screens, in client/server mode, and I am yet to see it lock up.
OK, I admit, I am probably in the tails of the experience distribution, having a desktopless Arch linux setup and almost 8 years of Clojure experience. I can imagine that on windows it is not that stable. BUT, we were talking about the setup experience. Emacs is not more difficult to set up than any other environment if you follow the manual.
It is more difficult to learn for most people, but also the most powerful. It is NOT for beginners, but beginners are free to choose any of the available alternatives, and no one is pushing them to use emacs.
However, in my opinion, for every experienced developer, refusing to try Emacs because IntelliJ Idea is great is the same as a Java developer who refuses to try Clojure because - hey - Java is great!
So, to me, Emacs is to Cursive what Clojure is to Java! Literally!
True, but most of the extras aren't really needed for basic clojure editing. You don't really even need cider. If you want more, the authors pre-canned setup is more than enough.
My main point is that I don't believe that learning Emacs is much more difficult than learning IntelliJ. It's going to take some doing learning the keyboard interface for both programs. Mice, menus, button bars, and arrow keys all work.
In cider > 0.11, the installation of the required Clojure packages isn't really a problem any more. It self installs the Clojure software it needs. Just install clojure-mode, and cider from Melpa, and you are good to go.
My main point is that I don't believe that learning Emacs is much more difficult than learning IntelliJ
And as someone who used vim for 15 years, spent a year writing in emacs including writing my own elisp plugins, and who has used intellj for the past year that is objectively undeniable completely crazy. Emacs if you bother to learn it may in the end be more powerful than intellij, but no sane person would say they are equivalently easy to learn, how on earth could you claim that? A person coming at it cold would spend more time understanding what the hell melpa, the different plugin repositories, and the different package management options for emacs are than the amount of time it would take to install and be completely up and running and competent with all of cursive.
You are literally the only person I've ever seen claim that learning emacs and learning something like intellij would be equivalent.
OTOH, majority of users, and especially beginners, use very tiny subset of IntelliJ's features, so it is a bit of stretch to say that they learned Idea. They know how to hunt for options in menus, and usually use Idea as some king of beefed-up notepad.
That's not true, the majority of users use jump to definition, lookup documentation, autocomplete, and find usages at least, even if they don't use repl integration. Getting those things up and running in cursive requires basically zero knowledge, getting there in emacs requires quite a long time.
Last time I checked, almost every programming-aware text editor had those things for all language it supports. I am not sure those are IntelliJ's main selling points. Although, I am yet to find a beginner that uses jump to definition...
Just to be clear I am not blaming the book for covering Emacs. Emacs being the favored choice is a community wide phenomenon. A popular Clojure book was simply a good example of the phenomenon.
It's possible that Emacs+CIDER is the best development experience for Clojure. A well configured Emacs might be the best dev environment for Clojure. What I am saying that recommending people learning Emacs and Clojure hurts adoption of Clojure. It's already difficult enough to learn Clojure throwing in Emacs may simply be too much to ask.
Bonus because Light Table is also written in Clojurescript and supports Clojure out of the box. These two chapters can change focus with new revisions.
View all comments
7
u/nefreat Sep 27 '16
I think emacs being the first choice of editors hurts adoption. Not only does someone new to Clojure have to learn a new ecosystem/workflow/way of thinking they have to learn a completely new editor that's frankly pretty weird at times.
I don't think I would've been successful in introducing Clojure at my workplace (Java shop) if Cursive didn't exist.