I would like to start programming using t开发者_开发知识库he Linux operating system and all the free stuff out there.
What is the most common and the best language to use with Linux, C or C++ or C#?
What tools are similar to Turbo C, or Visual Studio in Windows?
vim + gcc/g++ +make
. Language choice is task dependent/personal, but I'm not sure C# can be considered for Linux (Mono fans are welcome to downvote :) ).
For the language it really depends what you want to do :
- C is good for low level software, specially if performance is a priority, otherwise syntax can be painful for a first programming experience.
- C++ is good for high level software and has a lot of good qualities that C misses (e.g. classes, operator/function overload), but may require some good knowledge of C in case of serious trouble.
- if it is really your first programming experience, maybe learning with an interpreted language like Python/Perl could be a good idea to begin with.
For the text editor you have:
- the good old classics:
emacs/VIM
, I don't want to argue about the choice - graphical editors:
gedit
,gvim
,kate
. Personally, I really likekate
. - IDE:
kdevelop
,anjuta
,eclipse
,netbeans
. Personally I usenetbeans
for C/C++ development. Again, if it is a first experience, maybe beginning with an IDE is not a great idea to make things clear.
For the compiler, unless you have special needs, you don't need something else than GCC.
I'd say C and python are the best integrated languages with linux.
You'll need:
- A text editor (I won't suggest one as I don't want to cause a (/another) religious debate).
- gcc to compile C or cpython to run python programs.
- Some knowledge of a shell (like bash).
- For more complicated C programs, knowledge of a build system like make/scons/cmake/etc
- For debugging there is gdb for C and pdb for python.
- For version control there's git/mercurial/svn/etc.
You may also consider portability, that is you can deploy and run your application to different OS, like Mac-OS. And one candidate that offers that is C# Mono.
It depends on what sort of applications you intend to produce.
- C/C++ is suitable with embedded/OS applications (Vim + GCC).
- Java is suitable with business applications (Eclipse + J2SE)
PS: Visual Studio isn't supposed to be run on Linux.
C is one of the most common languages for Linux programming, so you should know it. I would advise against using C++, maybe once you've done a project in C.
I use vim + gcc + gdb
Others use IDE's like Code::Blocks, KDevelop, or Eclipse.
My first advice would be: make Makefiles for anything you do.
This is a very wide question and depends on many elements, such as: what is your programming experience, and more important - what do you want to develop.
The common languages are obviously C\C++, using mainly the GNU compiler. There are many IDEs available, like Eclipse CDT (maybe the most used one), CodeBlocks, and more. If you are coming from the Windows world, I guess you won't want to use text editors for coding, although there are many many Linux developers that use them (VI\ Emacs...) For GUI development, you can use Qt - this is a wonderful, easy to start with infrastructure (which supports also threading, networking, and much more). Qt is C++ as well.
C# is still not widely used in Linux, as Mono is not ripe enough. This language is the favorite for .Net developers, but it doesn't give you very much Linux experience.
And of course, after all you have Java - where the JVM does the compatibility work behind the scenes for you...
Python is the best choice to start programming, by far. Especially in a modern Xubuntu or similar environment, where packages exist to make GUI-based applications and much more.
There's an interactive editor where you can get the hang of things very quickly.
For a Python IDE, try PyDev or NetBeans or Geany. Me, I'm a recent NetBeans convert and I think it's an excellent IDE, even if I haven't tried it with Python (yet).
Why not try Python online and see if you like it? http://try-python.mired.org/
I like Python most for its lucidity and the ability to very quickly test out solutions.
Well if you already have coded in C#.Net before then you may try C# Mono, incase you want to shorten your learning curve. But must linux users use Python, actually.
精彩评论