Linux程序员用什么工具来开发程序? [英] What tools does Linux programmer use to develop programs?

查看:167
本文介绍了Linux程序员用什么工具来开发程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是从Windows迁移过来的,并且听说Linux程序员不使用IDE来开发程序,比如Visual Studio。这句话是真的吗? Linux程序员是否使用IDE进行实际开发?

I migrated from Windows, and have heard that Linux programmers do not use IDEs to develop programs, something like Visual Studio. Is this saying true? Do Linux programmers use IDE to do pratical development?

谢谢。

推荐答案

不,这不是真的。人们只是使用他们最喜欢的东西。 IDE的定义也有点弱。在Linux上,许多文本编辑器都非常强大,例如Emacs。您也许可以将该文本编辑器称为IDE。虽然,为了指出一个区别,Emacs(和其他文本编辑器)最初是非常通用的,只用它编写任何东西,以及用于开发C / C ++ /后来添加的任何便利的工具/函数。他们的编程语言主要支持*仅涵盖语法高亮,而不是更多。

No, it is not true. People just use what they prefer most. The definition of IDE is also a bit weak. On Linux, many text editors are very powerful, for example Emacs. You could perhaps call that text editor already an IDE. Though, to point out a difference, Emacs (and other text editors) were originally made to be very general and write just anything with it, and handy tools/functions for developing C/C++/whatever were added later. And their programming language support mostly* only covers syntax highlighting, not much more.

像KDevelop或Eclipse这样的应用程序最初被开发为一个开发环境,其中大多数仍然有开发更多/更好的功能。我称之为IDE。

Applications like KDevelop or Eclipse were initially developed to be a development environment and most of these still have more/better functionality to develop. I call these IDEs.

Linux上有许多不同的IDE,一些功能更强大,一些功能更弱,一些用于特定的编程语言,一些用于许多不同的IDE。根据你想写的语言,有些语言比其他语言要好。

There are many different IDEs on Linux, some more powerful, some less powerful, some for one specific programming language, some for many different. Depending what language you want to write in, some are better than others.

此外,有些语言比其他语言更臃肿。这是人们使用文本编辑器的主要原因之一,因为它非常活泼,非常稳定且速度非常快。

Also, some are more bloated than others. That is one of the main reasons people just use a text editor because it is very snappy, very stable and very fast.

我会列出一些IDE,我认为是最好的语言功能(如代码完成和许多其他东西)。

I'll list some IDEs which I think are the best in term of functionality specific to that language (like code completion and many other stuff).

对于C / C ++:

For C/C++:


  1. KDevelop

  1. KDevelop

据我所知,没有IDE可以更好地支持C / C ++。我没有找到任何其他处理C ++的工具,它真正理解STL,这对于STL容器和类似的东西使用自动完成非常重要。它甚至可以理解宏,因此自动完成甚至可以在非常复杂的情况下使用许多宏操作。我在一个~250k loc C ++项目上工作,它已经理解了完整的代码。 (要使用扩展的C / C ++支持,你必须在项目设置中激活它,默认情况下它被禁用。另外,为了获得完整的STL支持,我预先准备了STL头文件并将其添加到项目设置中的C ++支持中不知道是否还需要它。但我猜它仍然无法开箱即用。)

For what I know there is no IDE which has better support for C/C++. I didn't found any other tool which handles C++ in such a way that it really understands STL, which is important that you can use autocompletion for STL containers and such stuff. It even understands macros, so autocompletion even works in very complicated cases with many macro-tricks. I work on a ~250k loc C++ project and it has understood the full code. (To use the extended C/C++ support though, you have to activate it in project settings, it is disabled by default. Also, to have full STL support, I preparsed the STL headers and added that to the C++ support in project settings manually. Don't know if that is still needed. But I guess it still doesn't work out-of-the-box.)

此外,KDevelop非常活泼与许多其他IDE相比,它更快(用C ++开发)。它的加载速度几乎与其他任何简单的文本编辑器一样快,并且感觉像这样快速。对于非常大的项目而言,这也没有改变。因此,我自己只是用它来编辑/编写代码,而不是管理项目的编译。它有自动支持,但我更喜欢使用CMake。但是KDevelop可以正常工作:当我在KDevelop中按下编译时,它只是启动一个make。

Also, KDevelop is very snappy and fast (developed itself in C++), compared to many other IDEs. It loads almost as fast as any other simple text editor and feels as snappy as such. And that also doesn't change for very big projects. Whereby I myself just use it for editing/writing the code, not managing the compiling of the project. It has automake support but I prefer to use CMake. But KDevelop works fine with that: when I press compile in KDevelop, it just starts a make.

最初,KDevelop是作为KDE应用程序的开发工具开发的,但是它可以工作适用于任何C / C ++项目。我实际上从未做过任何Qt / KDE项目。此外,稍后添加了对Ada等其他语言的支持,但我还没有尝试过。

Initially, KDevelop was developed as a development tool for KDE applications but it works fine for any C/C++ project. I actually have never done any Qt/KDE project with it. Also, support for other languages like Ada were added later on but I haven't tried that.

我不知道任何其他IDE更好地支持C ++。如果我在这里错了,请评论我。在过去的一两年里,我没有检查过很多其他的IDE。

I don't know any other IDE which has better support for C++. Please comment me if I am wrong here. I didn't checked many other IDEs anymore in the last one or two years.

Eclipse

你可能已经知道了。最初它是为Java开发的。后来,添加了对C / C ++的支持。

You probably know that already. Initially it was developed in and for Java. Later, support for C/C++ was added.

我想要注意这个IDE,因为我知道有很多人使用它。我并不是真的推荐它,因为我主要经历过糟糕的经历。

I want to note this IDE because I know many people using it. I am not really recommending it though because I have mostly made bad experiences.

C ++支持很好,但并不完美;有些情况下自动完成功能不起作用。

The C++ support is good, not perfect though; there are cases where autocompletion doesn't work.

IDE本身的可能性和功能非常丰富。我不知道很多其他IDE如此大(臃肿)。它与Java一起,使它经常感觉非常缓慢,有时在你写东西时会挂起。内存使用率也非常高。

The possibilities and features of the IDE itself are very rich. I don't know many other IDEs which are such big (bloated). That, together that it is in Java, makes it often feel very slow and sometimes hanging while you are writing something. Also the memory usage is very high.

Qt Creator

Qt Creator

最初用于Qt开发,但也是适用于任何其他C / C ++项目。非常好的qmake支持。

Initially for Qt development, but also fine for any other C/C++ projects. Very good qmake support.

C ++支持很好,只有一些小问题。此外,IDE是快速而快速的。

The C++ support is nice, only some smaller problems. Also, the IDE is snappy and fast.

毕竟,我发现自己在这个IDE中有点太有限了,KDevelop中的C ++支持仍然更好,所以我保持在大多数C ++项目中使用KDevelop。但是当你做一个Qt项目时,Qt Creator非常棒,因为它还为Qt和其他不错的Qt工具提供了一些不错的GUI构建器。

After all, I found myself a bit too limited in this IDE and the C++ support in KDevelop was still better, so I kept using KDevelop for most C++ projects. But when you do a Qt project, Qt Creator is great because it also comes with some nice GUI builders for Qt and other nice Qt tools.

CLION

(商业版,但免费版。)JetBrains的新人。非常有前途。

(Commercial, but free version.) A newcomer by JetBrains. Very promising.

对于Java:


  1. Eclipse

  1. Eclipse

请参阅上面的评论。

对于Java,我认为这是是Linux上最常用的IDE。上面提到的相同缺点也适用于此,但我不知道更好的IDE,所以当我用Java开发时,我一直在使用Eclipse。

For Java, I think this is the most common IDE on Linux. The same disadvantages as noted above apply here also but I don't know any better IDE, so I keep using Eclipse when I develop in Java.

NetBeans

也适用于Java。从来没有尝试过,因为我的Linux发行版并没有真正支持它(我认为由于授权问题,不再记得了)。

Also in and for Java. Never tried that because it was not really supported in my Linux distribution (I think because of licensing issues, don't remember exactly anymore).

我看过很多火焰关于NetBeans-vs-Eclipse的过去。实际上并不知道目前的状态。

I have seen many flames in the past about NetBeans-vs-Eclipse. Don't know actually about the current state.

对于C#:


  1. MonoDevelop

  1. MonoDevelop

也没有尝试过我自己,只听说过它是最好的工具之一对于C#。只是想注意,因为你提到了Visual Studio,你可能对C#感兴趣。

Also haven't tried that myself, only have heard that it is one of the best tools for C#. Just wanted to note that because you referred to Visual Studio and you may be interested in C#.

我想添加关于终端用法的一些说法:

I want to add some words to the usage of the terminal:

除了这样的IDE之外,在IDE上并行使用终端是很常见的。终端及其所有shell以及所有Unix工具和其他工具非常强大,您可以以非常简单的方式完成许多任务。一旦你对所有Unix工具以及如何使用它们进行了很好的概述,它们可以为你节省大量的工作。

In addition to such an IDE, it is very common to use a terminal in parallel to your IDE. The terminal and all its shells together with all the Unix tools and other tools is very powerfull and you can do many tasks in a very simple way. Once you get a good overview over all the Unix tools and how to use them, they can save you a lot of work.

项目中经常有任务需要要一次又一次地完成。这可以是简单的任务,例如您如何管理源代码并将其与您的团队成员一起分发,或者更复杂的任务。

There are often tasks in a project which needs to be done again and again. That can be simple tasks like how you manage your source code and distribute it with your teammates or also more complex tasks.

例如,当您执行一些服务器 - 客户端工作时并在不同的机器上启动10个服务器和100个客户端,让他们都做点什么;然后grep一些正则表达式的输出并收集所有这些并在10秒内进行一些性能测试并重复几次这样的进展 - 一旦你管理终端,这些都是微不足道的。

For example, when you do some server-client work and start perhaps 10 servers and 100 clients on different machines, let them all doing something; then grep the output for some regular expressions and collect all that and do some performance tests over 10 seconds and repeat that progress several times - such things are all trivial once you manage the terminal.

你会发现自己最终只编写了几个脚本来完成所有这些操作。编写这样的脚本大多是直截了当的。

You will find yourself ending up having just several scripts written which do all that for you. Writing such scripts is mostly straight-forward.

这可能有点偏离主题,但我只想说明这一点,因为它是一种常见而强大的工作方式。当您作为开发人员从Windows切换到Linux时,您应该看看您现在拥有的所有其他可能性。这些是我(和许多其他人)为什么我更喜欢在Linux / Unix上开发而不是在任何其他系统上的主要原因。

This goes perhaps a bit off-topic but I just wanted to have that noted because it is a common and powerfull way to work. When you switched from Windows to Linux as a developer, you should take a look at all those additional possibilities you have now. Those are the main reason for me (and many others) why I prefer developing on Linux/Unix than on any other system.

(*)再一些对Emacs来说:Emacs可以扩展我的许多工具和插件,使其成为一个非常丰富的系统,具有与IDE相同的功能。例如, CEDET 带有真正的语言支持,即您还具有智能单词完成/智能感知以及项目管理系统。我自己没试过,但是接下来几周我会这样做。

(*) Again some words to Emacs: Emacs can be extended my many tools and plugins which make it a very rich system with the same functionality as an IDE. For example, there is CEDET which comes with real language support, i.e. you also have features like smart word completion / IntelliSense and also a project management system. I haven't tried it myself but I will do that in the next weeks.

这篇关于Linux程序员用什么工具来开发程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆