Editor and IDE

Source: Internet
Author: User
Document directory
  • Unnecessary editor war
  • Temporary solution-ide
  • Ultimate solution-structured Editor
Unnecessary editor war

Many people like to argue Which editor is the best. The biggest argument is the dispute between Emacs and VI. Supporters of VI like to say: "It's so fast to read VI and keep your fingers away from the keyboard. You can even use the direction keys ." Supporters of Emacs often dismissed this and said, "It is useful to type quickly. I press a key in Emacs to press dozens of keys in VI ."

In fact, there are another group of people who like to say: "For the battle between Emacs and VI, my answer is {jedit, geany, textmate, sublime ...} "these people get tired of Emacs's endless configuration and bugs, and VI's blind fast-seeking and troublesome mode switching, so they chose another simpler solution.

Temporary solution-ide

So what is my answer? In the current situation, my temporary answer to program editing is: IDE.

When writing a program, I usually select the "ide" (such as Visual Studio, eclipse, and intellij idea) that best understands the language based on the language ), instead of a common "Text Editor" (such as Emacs, Vi, jedit ,...). This is because "Text Editor" is generally not really familiar with programming languages. Many Emacs and VI users think that tools such as etags and ctags allow them to "Jump to definition ", however, these tags tools only perform stupid Regular Expression matching on the program's "text. They didn't perform parse on the program at all, so they were just making some guesses ". Simple functions may be able to guess their locations, but they are powerless when there are cognominal definitions or local variables.

Many people are biased against ide because they think that these tools make programming "dumbfounded" and they think it should be "difficult" to write programs, so they don't try free IDE. Some people use Emacs or VI for Java writing, rather than eclipse or intellij. But these people are wrong. They didn't realize that the IDE actually contains much more advanced technology than the normal text editor. These ides perform real parse on the program text before analyzing the structure. Their "Jump definition" is generally very accurate jump, rather than just like a text editor.

This kind of operations targeting programming languages can greatly improve people's thinking efficiency. It frees programmers from trivial details, so they can focus more on the semantics and algorithms of the program itself, in this way, they can write more beautiful and reliable programs. This is what I feel when I use eclipse to write a Java program relative to Emacs. I feel that my "mind eye" can "see" the "model" behind the program, not just the text and details of the program. Therefore, I often find that my mind can see the whole program at the same time, not just a part of it. My code is much shorter than many people, and most of it is because the tools I use allow me to spend the same time, code is converted many times more than others, so I can often turn the program into something that others cannot imagine.

For lisp and scheme, emacs can be regarded as an IDE. Emacs is of course the most friendly to lisp, and its slime mode is also quite good for editing Common Lisp. However, for any other language, Emacs is basically a layman. I spent most of my time writing some super short scheme code in Emacs. I have my own simple configuration solution. Although it is not IDE, Emacs is more convenient to edit scheme than other editors. R. Kent dybvig uses VI to write Chez scheme, but I don't think his programming efficiency is higher than mine. My code is often more neat than his, partly because my paredit mode enables me to efficiently convert the "shape" of the Code ".

I usually use eclipse when writing Java. C ++ has been written a lot recently. The best ide of C ++ is Visual Studio. Unfortunately, vs does not have a Linux version, so it makes sense to use eclipse together. In some cases, the eclipse "Jump definition" is completely unrelated, And the refactor implementation of c ++ is also poor, except for the simplest situations (such as renaming local variables ), in other cases, it is almost completely unavailable. Of course, all these difficulties encountered by ECLIPSE come from the poor design of the C ++ language itself.

Ultimate solution-structured Editor

If you want to design an IDE that supports all programming languages, it seems unlikely, but it is not that difficult. There is something called "structured Editor". I think it may be the ultimate solution for future programming.

Unlike general ide, this editor allows you to directly edit the ast structure of a program, rather than staying in the text. The "operations" on each interface correspond to the conversion of the ast structure, rather than the "edit" of text characters ". The changes in the ast cause the changes displayed on the screen, just as the changes in the ast are "Pretty print. These editors can directly Save the program language as structured data (such as the s expression, XML or JSON), and then directly "decode" The s expression, XML or JSON ", you do not need to perform different parse for different programming languages. Such an editor can be easily extended to any language and provide powerful functions that many people cannot imagine. This will be a revolutionary change for programming tools.

  • Someone has designed such an editor model, and the design is quite good. You can refer to this structured Editor, which contains some powerful functions not available in Visual Studio and eclipse, but is easier to implement than both. You can download this editor model on this webpage to try it out.

  • The texmacs I have previously recommended is essentially a "ultra-luxurious" structured editor. You may not know that texmacs can not only print the effect of Tex, but also run scheme code.

  • Jetbrains, the maker of intellij idea, made a structured editing system called MPS. It is an open-source software and can be downloaded for free.

  • In addition, Microsoft Word creator Charles Simonyi opened a company called intentional software, which also made similar software.

 

 

Source: http://www.admin10000.com/document/2077.html

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: info-contact@alibabacloud.com 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.