Hacker News new | past | comments | ask | show | jobs | submit login

"It's amazing that in 2015 we have people that use Emacs, Vim, or other editors that don't have intelligent, realtime code analysis and we consider that "hardcore, programmer machismo"."

What is amazing is that in 2015 there is people out there that believes Vim or Emacs have no intelligent, realtime analysis.

In fact, in year 2015 Emacs and Vim have the best real time, intelligent analysis out there for those that know how to use them and are trained on them.

You can use elisp inside emacs and automate EVERYTHING running circles around anything commercial.

I have a company making software and I know. With the proper training those tools are incredible.




In fact, in year 2015 Emacs and Vim have the best real time, intelligent analysis out there for those that know how to use them and are trained on them.

I develop Cursive, an IDE based on IntelliJ for Clojure code. Its completion and navigation are categorically better than Emacs's, even for a language that supposedly has one of the best levels of support under Emacs.

To say that Emacs is automatically better than everything else is pure Stockholm syndrome.


I have nothing against Cursive, and in fact, have been eying it from afar. But this kind of comment is just needlessly dismissive with little in the way of substance, as far as I can tell. Would you like to expand on what these features that Cursive has that are "Categorically better" than Emacs'?

I'm not saying there isn't any, and certainly I've used better refactoring tools than https://github.com/clojure-emacs/clj-refactor.el in other languages. But what on earth is wrong with the navigation? The main advantage I've seen form a colleague is the highlighting automatically of usages, but I'm pretty sure I can set that up in Emacs too.


I have nothing against Emacs either, and I didn't say that there was anything wrong with its navigation. What I said was the assertion that Emacs and Vim have the best realtime analysis is just wrong - most Emacs modes have none at all.

If you're interested in the implementation of this sort of functionality in Emacs, Steve Yegge's article on implementing JS2 mode is really interesting: http://steve-yegge.blogspot.co.nz/2008/03/js2-mode-new-javas.... He says at the end that IntelliJ's JavaScript support is just better, and it's very clear from the article how difficult it is to retrofit this sort of functionality into something that isn't built from the start to support it.

But you're right that the tone of my comment wasn't great, and in general getting involved in these discussions is just a bad idea. Every so often I see a comment that makes it difficult to resist, but I always regret it.


But what on earth is wrong with the navigation?

To answer this specific question - Cursive's Java interop support is much better than anything else I'm aware of. It implements Clojure's type inference in the editor, so method calls are accurately resolved to the right method based on the number and types of the parameters, and completion takes this into account so that you can explore Java APIs almost as well as with Java in IntelliJ. Cross-language navigation and Find Usages works - in Cursive you can navigate from RT.var() calls to the Clojure code, and Find Usages from Clojure will find the RT.var() calls. This also works for other JVM languages - there are quite a few Cursive users with mixed Clojure/Scala codebases, and this all works there.

You can search for all usages of a particular keyword, and it will also find all local bindings destructured from it using :keys. Namespaces will be auto-required during completion based on examples elsewhere in your project, not hard-coded config. This works in the REPL too - you can type str/tr and when it's completed into str/trim Cursive will automatically (require '[clojure.string :as str]) in your REPL.

One other nice thing is that since Cursive works from source, pretty much everything that works for Clojure works for CLJS too.

There's lots more along the same lines, hopefully this gives you an idea. Again, there's nothing wrong per se with Emacs' navigation, but IntelliJ just provides a much more sophisticated infrastructure for it. Obviously elisp is Turing-complete so all this could in theory be implemented but it's much harder, as Yegge describes in the article I linked in my other comment. The clj-refactor guys are doing a great job but the lack of a good indexing infrastructure is going to mean that a lot of this functionality is hard or impossible to implement.

Emacs is a great choice for a lot of people and if you're willing to invest the time to trick it out and maintain it, especially for Clojure you can get a really nice environment. But probably the feature that most people like about Cursive is that it just works out of the box, and stays working with no messing around and no development of your editor required. And WRT my original comment - to say that Emacs has the most sophisticated runtime analysis is just wrong.


Emacs is scriptable, but elisp is probably the worst lisp in widespread use.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: