magpiebrain

Sam Newman's site, a Consultant at ThoughtWorks

So all the cool Clojure kids keep wanting me to use Emacs. The problem is that I haven’t used Emacs for the last 10 years – since, in fact, I had to support a C application on about 7 different flavours of UNIX. As you can imagine, I’ve since expunged many of those past memories.

My IDE of choice – ever since I joined ThoughtWorks – has been IntelliJ. Yes, I had to spend my time in the wilderness with Eclipse, long enough that I feel well placed to compare the two and consider IntelliJ superior for the languages I use often. La Clojure now seems to play nicely with IntelliJ’s Community Edition, so I’m giving that a try.

Ultimately, I’m learning a new language, one which often requires my brain to work in a quite different fashion than it is used to. As such, I’m trying to limit the number of new things I have to deal with. If, however, I’m missing out on something by not using Emacs, I may be persuaded to give it a go. So can anyone out there tell me what I’m missing?

Advertisements

6 Responses to “Clojure editor/IDE options – IntelliJ v Emacs”

  1. Sam Newman

    Hang on, are you talking about IntelliJ or Emacs here? If your emacs takes 45mins to load, I suspect IntelliJ will take even longer šŸ™‚

    Reply
  2. Phil Dawes

    For me I guess the upsides are: never using the mouse, aggressively optimizing keystrokes, macros, registers and elisp.

    Also a basic set of programming features that work for any language (code colouring, auto-indent, tags (poor man’s jump to defn), macros, registers). This encourages me to try out new languages early.

    And emacs encourages my brain to treat any textual data as refactorable source which saves a ton of time when I’m sys-admining or troubleshooting.

    To be honest it’s not the individual features that render it decent, it’s the culture that strongly encourages you to optimize the hell out of everything. Steve Yegge has written a lot on this. See:
    http://steve.yegge.googlepages.com/effective-emacs
    http://www.emacswiki.org/emacs/SteveYegge

    (probably worth reading for tips and motivation even if you never use emacs)

    Incidentally, this quote is one of his:
    “Emacs is to Eclipse as a light saber is to a blaster – but a blaster is a lot easier for anyone to pick up and use.”

    Obviously Emacs is never going to compete with intellij on java features if that’s important to you.

    Reply
  3. Ben Butler-Cole

    The answer, of course, is that you are missing out by not using Emacs. Not only is it a fantastic editor, but it’s a very interesting example of system design (not perfect by any means, but interesting — specifically in the matter of extensibility). I strongly advise you to learn Emacs and therefore, ineluctably, to adopt it as your editor for everything.

    However I don’t think it’s a good idea to learn Emacs in order to use it as an IDE for a new language. There’s no point overloading your poor brain with too much new stuff at once. It’s madness that newcomers to Lisp are always told to use Slime. You do need something that will balance braces for you, but try to find something familiar (like IntelliJ) or helpful (like FranzLisp or DrScheme).

    If you correctly decide that you can’t live a month longer without clasping Emacs to your bosom then use it for a project in a language that you know that has a good Emacs mode (js2mode might suit you) or just for text. Have you come across org-mode?

    Ben

    Reply
  4. Tom

    Whilst other commenters have focussed on emacs as a whole, there are some specific clojure/lisp things that make emacs top dog for clojure development.

    The first is paredit. This makes emacs treat
    s-expressions properly, and ensures that you don’t have to
    manually balence parens. It takes some getting used to, but it’s addictive once you have it down.

    The other thing is slime, and in partiular clojure-test-mode. These two turn emacs into a near-IDE for clojure.

    Clojure test mode let’s you run test files quickly, and get feedback pretty much instantly. This vastly speeds up tdd in clojure, as you don’t have to wait for the jvm to start each tine you want to test.

    Finally, I wrote a clojure refactoring tool that works pretty nicely, and I don’t think intellij has anything like that for clojure code (yet).

    Reply

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Basic HTML is allowed. Your email address will not be published.

Subscribe to this comment feed via RSS

%d bloggers like this: