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

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

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


当前回答

对我来说,这只是我们在终端时代所做的一切的GUI版本。我一直认为IDE不是很优秀,因为它们隐藏了很多东西,特别是关于链接的东西,但在某些情况下,它们有一个显著的优势,例如与某些开发平台,如Qt。

有些IDE甚至可以在你输入代码时解析代码,并在你编译之前检测错误:从逻辑上看,似乎只有IDE可以与编译器紧密合作,立即检测类型化源代码中的问题。

我疯狂地回答IDE/命令行之争的存在只是因为C/ c++可执行的构建不是很好地处理从标准化的角度来看,不像D语言;每个平台都以自己的方式处理编译/链接等,所以为了不那么混乱,他们制作了一个IDE。

从你的角度来看,使用命令行可能会更简单,如果只有一个带有标准选项的编译器,那就很容易了,但事实是C/ c++是灵活的,所以最后,所有平台都用自己的方式来做,因此IDE不会浪费时间解释如何做。

如果您了解可执行文件如何与内核对话,或者如果您了解编译器设计,那么也许有一种方法可以使用合适的命令行,但我怀疑您没有。

微软或苹果,他们都是邪恶的,必须提出一种直接的方法来构建应用程序,而不需要进入细节,因为构建应用程序直接依赖于操作系统的架构,它很难像命令行那样是“标准的”。

把它放在简单、大而复杂的应用程序中,你不想深入研究它的功能——> IDE,小块软件或简单的系统软件设计——>命令行。当然,除了那些嵌入Makefile的漂亮的库,但那是另一个故事。

另外,我认为IDE是在应用程序与GUI或有接口或直接绑定到操作系统的东西有关时使用的,所以,它也适用于那些使用UI/GUI但不知道它如何工作的人,而那些编写系统程序的人不需要它。

IDE只是现代的垃圾,但我认为在100年内命令行还会存在。

其他回答

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.

ide基本上是:

编辑器/代码完成,重构和文档 调试器 文件系统资源管理器 scm的客户 构建工具

都在一个包里。

您可以使用单独的工具或出色的可编程编辑器和额外的工具,如Emacs(也可以使用Vim,但IDEbility IMO稍微少一些)来实现所有这些功能(以及更多功能)。

如果您发现自己经常在一个实用程序和下一个可以集成到环境中的实用程序之间切换,或者如果您缺少这里列出的一些功能(其他文章中有更完整的功能),那么可能是时候转移到IDE了(或者通过添加宏之类的方法来提高环境的ideability)。如果你已经用一个以上的程序构建了一个“IDE”(在我上面提到的意义上),那么就没有必要转移到一个真正的IDE。

节省开发时间 通过提供集成调试、智能感知等功能,使生活更轻松。

有很多,但我会建议使用一个,他们比明显。

基于gui的ide(如Visual Studio和Eclipse)比基于文本的ide(如Emacs或vim)有几个优势,因为它们具有显示功能:

所见即所得预览和实时编辑的GUI设计 高效的属性编辑器(例如;使用GUI调色板选择颜色,包括定位渐变停止等) 代码概要、文件相互关系等的图形化描述 更有效地使用屏幕空间来显示断点、书签、错误等 更好的拖放支持操作系统和其他应用程序 集成编辑图纸、图像、3D模型等 显示和编辑数据库模型

基本上,使用基于gui的IDE,你可以在屏幕上获得更多有用的信息,你可以像查看文本部分一样轻松地查看/编辑应用程序的图形部分。

作为开发人员,最酷的事情之一是编辑一个计算一些数据的方法,并看到代码的实时输出以图形方式显示在另一个窗口中,就像你的用户在运行应用程序时看到的那样。现在,这就是所见即所得编辑!

基于文本的ide(如Emacs和vim)可以随着时间的推移添加代码补全和重构等特性,因此从长远来看,它们的主要限制是基于文本的显示模型。

我从相反的方向来回答这个问题。我从小就在Makefile+Emacs的环境中编程。从我最早的DOS编译器,微软的Quick C,我有一个IDE自动化的事情。我在Visual c++ 6.0上工作了很多年,当我毕业到Enterprise Java时,我使用Borland JBuilder,然后决定使用Eclipse,这对我来说已经变得非常高效。

Throughout my initial self-teaching, college, and now professional career, I have come to learn that any major software development done solely within the IDE becomes counterproductive. I say this because most IDE's wants you to work in their peculiar I-control-how-the-world-works style. You have to slice and dice your projects along their lines. You have manage your project builds using their odd dialog boxes. Most IDE's manage complex build dependencies between projects poorly, and dependencies can be difficult to get working 100%. I have been in situations where IDE's would not produce a working build of my code unless I did a Clean/Rebuild All. Finally, there's rarely a clean way to move your software out of development and into other environments like QA or Production from an IDE. It's usually a clicky fest to get all your deployment units built, or you've got some awkward tool that the IDE vendor gives you to bundle stuff up. But again, that tool usually demands that your project and build structure absolutely conforms to their rules - and sometimes that just won't work for your projects' requirements.

我了解到,要与团队一起进行大规模开发,如果我们使用IDE开发代码,并使用手动编写的命令行脚本进行所有构建,那么我们可以获得最高的效率。(我们喜欢用Apache Ant进行Java开发。)我们发现在IDE中运行我们的脚本对于复杂的构建来说只是一个点击或者自动化的噩梦,用alt+tab到一个shell并在那里运行脚本要容易得多(而且破坏性更小)。

Manual builds requires us to miss out on some of the niceties in the modern IDE like background compilation, but what we gain is much more critical: clean and easy builds that can live in multiple environments. The "one click build" all those agile guys talk about? We have it. Our build scripts can be directly invoked by continuous integration systems as well. Having builds managed through continuous integration allows us to more formally stage and migrate your code deployments to different environments, and lets us know almost immediately when someone checks in bad code that breaks the build or unit tests.

In truth, my taking the role of build away from the IDE hasn't hurt us too badly. The intellisense and refactoring tools in Eclipse are still completely useful and valid - the background compilation simply serves to support those tools. And, Eclipse's peculiar slicing of projects has served as a very nice way to mentally break down our problem sets in a way everyone can understand (still a tad bit verbose for my tastes though). I think one of the most important things about Eclipse is the excellent SCM integrations, that's what makes team development so enjoyable. We use Subversion+Eclipse, and that has been very productive and very easy to train our people to become experts at.