Use the editor or IDE?

Source: Internet
Author: User

Many people like to argue which editor is the best. One of the biggest controversies is the dispute between Emacs and VI. VI supporters like to say: "Look at the VI dozen words to how fast, the finger completely away from the keyboard, even the direction of the key can not be used." "The supporters of Emacs tend to dismiss it, saying," What's the use of typing fast? I press a key in Emacs, which equals you pressing dozens of keys in VI. ”

In fact there are a bunch of people, these people like to say: "For Emacs and VI dispute, my answer is {jEdit, Geany, TextMate, Sublime ...}" These people are tired of Emacs's endless configuration and bugs, and are tired of VI's blindness and trouble mode switching, so they chose another simpler solution.

Temporary Solutions-IDE

So what's my answer to that? In the present case, my temporary answer to the program editor is: IDE.

When writing a program, I usually choose the "IDE" (such as Visual Studio, Eclipse, IntelliJ idea, etc.) that best "understands" the language, rather than a generic "text editor" (such as Emacs, VI, JEdit, ...). )。 This is because "text editor" is generally not a real understanding of the programming language. Many users of Emacs and VI think that using tools like Etags and Ctags will allow them to "jump to definition", but these tags tools actually do some stupid regular expression matching to the "text" of the program. They do not parse the program at all, so they are just doing some "guessing". Simple function definitions They may be able to guess the right position, but they are overwhelmed by the definition of duplicate names, or local variables.

Many people are biased against the IDE because they think that these tools make programming "stupid", they think that writing programs is supposed to be "difficult", so they see the free IDE also do not try. Some people write Java using Emacs or VI instead of Eclipse or IntelliJ. But these people are wrong. They don't realize that the IDE actually contains a lot more advanced technology than the normal text editor. These Ides do a real parse of the program text before starting to analyze the structure inside. Their "Jump to definition" is generally a very accurate jump, rather than as a text editor to guess.

This programming language operation can greatly improve people's thinking efficiency, it frees the programmer 's mind from the trivial details, so they can focus more on the semantics and algorithms of the program itself, so that they can write more beautiful and reliable program. This is how I feel about Emacs when I use Eclipse to write Java programs. I feel that my "eye of the Mind" can "see" the "model" behind the program, not just the text and details of the program. So, I often find that my mind can see the whole program at the same time, not just part of it. My code is much shorter than a lot of people and a lot of this is the reason, because I use the tool can let me in the same time, the code to do more than others of the structure of the transformation, so I tend to turn the program into other people can not imagine the way.

For Lisp and Scheme,emacs can be considered an IDE. Emacs is certainly the friendliest for Lisp, and its slime mode is pretty good for editing Common Lisp. However, for any other language, Emacs is basically a layman. Most of my time in Emacs is writing some super short scheme code, I have my own simple configuration scheme. Although it is not ide,emacs edit Scheme is indeed more convenient than other editors. R. Kent Dybvig wrote Chez Scheme using VI, but I don't think his programming efficiency is higher than mine. My code is a lot more neat than his, partly because I use the Paredit mode that allows me to convert the "shape" of the code very efficiently.

When it comes to writing Java, I usually use Eclipse. More recently than C + +, the best IDE for C + + is, of course, Visual Studio. Unfortunately, VS does not have a Linux version, so take Eclipse to make use of, feel more handy. In individual cases Eclipse "jump definition" to some completely unrelated places, for C + + Refactor implementation is also very poor, in addition to some of the simplest cases (such as local variable renaming), other times almost completely unusable. Of course, the difficulties that Eclipse encounters come from the poor design of the C + + language itself.

The ultimate solution-structured editor

To design an IDE that supports all programming languages, it seems unlikely, but it's not that hard. There is something called a "structured editor", which I think might be the ultimate solution for future programming .

Unlike the normal IDE, this editor allows you to edit the program's AST structure directly, rather than staying in the text. The "action" on each interface corresponds to a transformation of the AST structure, rather than the "edit" of the text character. This AST change, which causes the changes on the screen to appear, is like the changed AST being "pretty print". These editors can directly save the program language as structured data (such as S-expressions, XML, or JSON), and then simply "decode" the S-expression, XML or JSON, without having to parse the different programming languages. Such an editor can be easily extended to any language and offers powerful features that many people cannot imagine. This will be a revolutionary change for programming tools .

In my opinion, some people like the editor, some people like the IDE, mainly relative only, see which kind of handy.


Use the editor or IDE?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.