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

Possibly not much. I've never used XCode for C++ development but I imagine it has pretty nifty Clang integration, given Apple's investment in Clang. Anyone who suggests using ctags, GNU Global, gtags, CEDET's own parser (implemented in elisp!), etc. for C++ navigation is basically saying "use a C parser to parse C++ code", which works well enough if you're writing 1990s style C++, I suppose. There are projects out there to integrate with Clang (such as rtags mentioned by another poster) but it will require hours/days of setup & frustration, and the result won't be as good as a dedicated C++ ide.

BTW I say this as an emacs fan and the author of http://david.rothlis.net/emacs/howtolearn.html and https://github.com/drothlis/clang-ctags/

Where emacs shines (for me, at least) is when you spend a lot of time in different languages. Maybe you spend 50% of the time in C++, but the other 50% in shell, makefiles, python, etc. -- and the benefit of better C++ code navigation begins to seem like a micro-optimisation that isn't worth the tradeoff compared to Emacs's support for navigation, version control, compilation, linting, grepping, etc etc, all of which are consistent across all languages. Not to mention Emacs's great support for text manipulation in general.

Also Emacs seems to me the best bet for the "one true editor" you'll still be using in 20 years (by which time hopefully few of us will still be using C++).

I'll also point out that on OS X, Emacs has a lower learning curve than any other OS, at least as far as the basic keystrokes: OS X's Command key still works for the usual shortcuts (cut, copy, paste, save, open, quit, undo) while the quirky emacs bindings are on the Control and Option keys. This doesn't make it any easier to set up a C++ navigation solution, of course.




I agree with everything you said about other aspects of Emacs.

You are right that supports for C++ is not as rich, since it is such a complicated language. But for small C++ projects and large C projects, it is pretty much usable, especially just for code navigation. At least it's better than using Grep and better than nothing at all. The currently available tools are perfectly usable for those who only write C.

For code completion, there's no pretty solution, but at least simple solution like company-clang which uses clang to get completion candidates from system include paths is pretty usable.




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

Search: