Skip to content

Comment on Ask HN: Why would you prefer Emacs over IntelliJ IDEA?

Comments

(note: everything here is scoped to the Java/JVM ecosystem.)

Not to flamebait, but as someone who has worked extensively with large Java / Clojure projects, the only reasons you would use Emacs are

- when working with a toy project (only one module, no complex dependencies or scoping

- intertia (or less kindly, stubbornness)

- ignorance

I have nothing against command line tools. As a linux user, I use Vim whenever possible and it makes sense. But when you are using a large modern Java application, especially one built on a framework (ex Hadoop) with a complex dependency chain and command line classpath manipulation, you are going to go insane trying to manage everything in Emacs. Intellij gives you many huge tools

- JUnit integration and debugging. I don't know if Emacs in theory supports this, but I am sure no plugin will correctly parse dependency chains and let you debug a test well

- Finding references and usages. You can find all usages of a method or class across an entire codebase with a few keyboard shortcuts in Intellij. This is hugely valuable when figuring out what teams are impacted by changes. Grepping for usage simply does not cut it (grep for .get()? hah.)

- Safe refactoring. Want to rename a method? Just refactor it, and everything will compile afterwards, including all usages, and if you want, all superclasses or interfaces which define the method. Incredible.

- Style and safety warnings. The method recurses infinitely? You're getting the wrong type out of the map? A local variable is unused? Intellij will do them all. Not a chance, unless your IDE is integrated with a real compiler.

I could spend all day filling in this list, but you get the idea. You can waste time playing around writing Java in Emacs, but at the end of the day my goal is getting real work done.

Java is one of the langauges emacs has the weakest support for. It really depends on the language.

Emacs is has great C# support with navigation, refactoring, auto-completion (the real thing, not a text match), etc. Combine that with the various helm methods of grepping, helm-cmd-t, and helm-git-grep. Emacs is better than Visual Studio at C#, but you do need to dive down the rabbit hole to really use it well. Emacs blows IntelliJ out of the water when it comes to C#.

First class Java support is possible, but most hard core emacs users could care less about Java.

If you use lisp you get SLIME. Your unit tests are macros, with first class support as any other part of the language. And whatever shenanigans you can dream up will be supported as a first class part of the language, that would require vendor support in IntelliJ.

First class Java support is possible, but most hard core emacs users could care less about Java.

This is surprising to learn considering the two languages are similar in so many ways. Why is this the case?

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.