在另一个问题中,Mark高度评价了ide,说“有些人仍然不知道”为什么“他们应该使用一个……”。作为一个使用vim进行编程的人,并且在大多数/所有同事都使用vim或emacs进行所有工作的环境中工作的人,ide的优势是什么?我为什么要用它?

我相信这对一些人来说是一个棘手的问题,我对开始一场论战不感兴趣,所以请只回复你认为基于ide的方法更好的原因。我对听到为什么我不应该使用IDE不感兴趣;我已经不用了。可以这么说,我感兴趣的是听取“栅栏的另一边”的意见。

如果您认为ide可能适合某些类型的工作,但不适合其他类型的工作,我也很想知道为什么。


当前回答

我更喜欢IDE,因为它允许我集成编辑/编译/调试,只需单击一下从错误跳转到生成错误的行。此外,它允许使用操作系统标准接口显示多个信息窗格。简而言之,它为用户提供了一个基于鼠标的输入界面和一个现代的输出界面,而不是依靠上世纪70年代的技术和界面来帮助我。

IDE还有更复杂的用户和用途,我并没有说我使用过他们或了解他们所有人。当我需要的时候,我会学习它们。

其他回答

这取决于你使用的语言,但在c#和Java中,我发现ide对以下方面有好处:

Quickly navigating to a type without needing to worry about namespace, project etc Navigating to members by treating them as hyperlinks Autocompletion when you can't remember the names of all members by heart Automatic code generation Refactoring (massive one) Organise imports (automatically adding appropriate imports in Java, using directives in C#) Warning-as-you-type (i.e. some errors don't even require a compile cycle) Hovering over something to see the docs Keeping a view of files, errors/warnings/console/unit tests etc and source code all on the screen at the same time in a useful way Ease of running unit tests from the same window Integrated debugging Integrated source control Navigating to where a compile-time error or run-time exception occurred directly from the error details. Etc!

所有这些都节省时间。这些事情我可以手动完成,但会更痛苦:我宁愿编写代码。

拥有IDE有以下优势:

编译通常是“动态的”,这意味着不再切换到命令行进行编译 调试是集成的,在IDE中拥有调试意味着步进调试器实际上使用就地编辑器来直观地显示执行了哪些代码 IDE通常对您正在使用的语言具有更多的语义知识,并且可以在输入时向您显示可能出现的问题。重构比“搜索替换”强大得多。

还有很多,也许你应该试试。

Eclipse:

代码高亮显示,在后台编译,在执行过程中指出错误。

与javadoc集成,使用ctrl-Space提示变量名。

当我编译时,就会得到错误。我可以双击一个错误,它会显示相应的行。

很好地与JUnit集成,ctrl-F11运行测试,告诉我测试失败了。如果在输出窗口中出现异常,我可以双击某行,并将我带到失败的行。不仅如此,ctrl-F11还可以确保在运行测试之前编译所有内容(这意味着我永远不会忘记这样做)。

与ant集成。一个命令用于构建和部署应用程序。

集成调试器,包括web服务器的远程调试。

神奇的重构工具,搜索一段代码的引用。帮助我了解改变的影响。

总而言之,这让我更有效率。

For me, an IDE is better because it allows faster navigation in code which is important if you have something in your mind to implement. Supposed you do not use an IDE, it takes longer to get to the destination. Your thoughts may be interupted more often. It means more clicks/more keys have to be pressed. One has to concentrate more on the thought how to implement things. Of course, you can write down things too but then one must jump between the design and implementation. Also, a GUI designer makes a big difference. If you do that by hand, it may take longer.

It's really VERY simple. But this answer is a bit of a paradox in that I am discussing something only EMBEDDED level developers ever encounter. The reason this is an odd view is that frankly when I was doing embedded work (the brief time I was making any real money) an IDE would be down right STRANGE and most of your coworkers would wonder why you can't remember enough about SNMP/ASN.1 or whatever protocol you were dealing with to just /do your job/. BUT you can NOT, as far as I know, do a graphical simulation of what your microcontroller is doing in something like /real time/ without an "IDE".