Today's Question:  What are bad parts of Windows 10?       GIVE A SHOUT

Technical Article => Other =>  Other

Text editor vs IDE

 王垠     2013-05-20 12:03:39      5,857    1    0

A meaningless editor war

Many people like to debate which editor is the best. The biggest controversy is between Emacs and vi. vi supporters like to say: "Look it's very fast to type in vi, our fingers no need to leave the keyboard, we even no need to use the up,down,left and right keys" Emacs supporters often downplayed this and said: "What's the use of typing fast if I just need to press one key and it equals to dozens keys you type in vi?"

In fact, there is another group of people who like to say: "About the war between Emacs and vi, my answer is {jEdit Geany, TextMate, Sublime ..." These people are tired of the Emacs endless configuration and bugs, they are also tired of single goal of vi to pursue quickness and the troublesome mode switching in vi, so they choose other more simple solutions.

Temporary solution - IDE

What's my answer to this? In the present circumstances, the temporary answer to program editing is: IDE.

When writing programs, I usually choose the IDE which can best "understand" that language such as Visual Studio, Eclipse, IntelliJ IDEA, etc. rather than using a general purpose text editor such as Emacs, vi, jEdit, .... This is because text editors generally can not really understand the programming language. Emacs and vi users think that they can use etags and ctags to enable them jump to the definition of functions However, these tags tools are really just doing some stupid regular expression matching, they do not have parse the program, so in fact they are only doing some blind guesses.  They may be able to guess the right location for some simple function definitions, but for the functions which are overloading, they are powerless.

A lot of people are biased on IDE, because they believe that these tools allow programming to become a "fool", they think programming should be difficult, so they do not try to use IDE even though they may be free. Some people write Java using Emacs or vi rather than using Eclipse or IntelliJ. But these people are wrong. They do not realize that IDE contains a lot more advanced technology than ordinary text editors. These IDEs will do real parse on these programs before starting to analyze the structure of the programs. "Jump to definition" are generally very precise rather than as a shot in the dark like a text editor.

The operation of the programming language of IDE can greatly improve the efficiency of people's thinking, it makes the mind of the programmer free from the trivial details, so they can be more focused on the semantics and algorithm of the program itself and they can write more beautiful and reliable procedures. This is my feeling when I use Eclipse to write Java programs instead of using Emacs. I feel that my mind could see the model behind the program instead of just seeing the text and details of the program. My program is often shorter than others is because of this, The tools I use allow me to refine my codes many times more than others during the same period.

For Lisp and Scheme, Emacs can be regarded as an IDE. Emacs is most friendly to elisp, its Slime mode is also quite good to be used to edit Common Lisp. However, for any other language, Emacs is basically amateur. I spent most of my time in emacs on writing some super short Scheme codes, I have a simple configuration program. Although it's far from the IDE, Emacs is indeed better than other editors for editing Scheme. R. Kent Dybvig wrote Chez Scheme using vi, but I do not think his programming efficiency higher than me. My codes are often more clear than his, part of the reason is because I'm using ParEdit mode which allows me to change the code "shape" efficiently

When writing Java, I generally use Eclipse. Recently I wrote a lot of C++ codes, for C + + the best IDE is Visual Studio on Windows. Unfortunately Visual Studio has no Linux version, so we can use Eclipse instead,

Ultimate solution - structured editor

It seems impossible to design an IDE which can support all programming languages, but it's not that hard. There is something called "structured editor", I think it may be the ultimate solution for future programming.

Different from ordinary IDE, this kind of editors allows you to directly edit the AST structure of the program rather than the text. Each operation on the interface corresponds to a conversion of AST structure rather than editing text character pf the program. The AST changes will cause consequent changes on the display display. These editors can directly save the programming language as structured data such as S-expressions, XML or JSON, then we only need to decode on S-expressions, XML or JSON data without the need for parsing different programming languages. This editor can be easily extended to any language and provides people powerful functions. This will be a revolutionary change for the programming tools.

  • Some people have designed such a model editor, and the design is quite good. You can refer to this structured editor which contains some of features Visual Studio and Eclipse don't have,  On this page you can download this editor and have a try.
  • The TeXmacs is a "super-luxury" structured editor. The TeXmacs not only can do TeX like effect typesetting but also be able to run the Scheme code.
  • The author of IntelliJ IDEA JetBrains wrote a structured editing system called MPS. It is an open source software and can be downloaded free.
  • In addition, Microsoft Word creator Charles Simonyi opened a company called Intentional Software which also creates similar software.

Author : 王垠 Source : http://www.yinwang.org/blog-cn/2013/04/20/editor-ide/

 Tags : Editor,IDE,Structured editor,vi   Read(5,857) Comment(1) Version(0)

  SAVE AS PDF   MARK AS READ   MARK AS IMPORTANT

 RELATED


 COMMENT  (TOTAL 1 COMMENT)


Me [Reply]@ 2013-05-21 02:34:08

Get Sublime Text and you won't need anything else! ;)


Nickname  
Email 
Comment

No game no pain

By sonic0002

 CONTRIBUTE


Share your geeky stuff now.
You make the world better, the world makes us better.

 WRITE ARTICLE

 VERSION


No other version available yet.