Most Used Coding Styles (Just a Few Basic Items)

Started by
22 comments, last by Rydinare 16 years, 1 month ago
Quote:Original post by ToohrVyk
Quote:Original post by Rydinare
The fact that people are choosing to use vim and Emacs as their primary editor at this point almost seems ridiculous, though.


I use emacs because it's more flexible than the other editors:
  • It handles OCaml. This includes a decent toplevel interaction system which I've seen in no other IDE. It also provides correct syntax highlighting: C-based IDEs generally fail to recognize nested comments, type parameters ('a is not the beginning of a character literal) or even highlight types.
  • It handles LaTeX. It's auto-configured upon install, it's free, and it provides a reasonable amount of built-in WYSIWYG with minimal effort. Few editors I've seen handle LaTeX this well, and most that do are unusable for anything else and cost money.
  • It handles XML and HTML, and also performs automatic validation of code. While not as advanced as a dedicated HTML editor, it's enough for my needs and doesn't require me to have several editors running at the same time.
  • It handles C, C++, PHP, Java correctly without requiring anything more than apt-get install whatever-mode.
  • It handles script and makefile editing.
  • It's entirely keyboard-controlled by default and in a reasonably standard way across computers. This may sound useless, but it's actually great to be able to keep your hands on-keyboard at all times.


Until I can find a single editor that can handle all the above on my workstation, I will use emacs as my primary editor, and only resort to secondary editors (such as Visual Studio) when I have extremely specific work to do.


Interesting. Just for reference, other editors handle most of those. I have no idea about OCaml or Latex. XML handles just fine in Visual Studio. When I do Java, I use Eclipse, which has a bunch of nice tools (refactoring, automatic compilation, etc...) that go along with it. That's part of the IDE experience, is you get more than just a text editor.

Anyway, while I understand that you can gain a familiarity by sticking with a single editor, I think you might also find that specialized editors for a particular task work better than a single do-it-all solution for every type of thing you're editing.

Anyway, since the only things of that list we're currently using are C++, XML and Python, I'm not sure my other team members could use the same reasoning.
Advertisement
Quote:Original post by Rydinare
Just for reference, other editors handle most of those.


I can't help but notice that you are missing my entire point and arguing for something else right now than you did in your previous post. If you remember your initial statement, you might notice that it was related to the choice of a primary text editor, namely the fact that emacs or vim are ridiculous for that purpose.

I certainly agree that, for the purpose of developing C++ code, a specialized IDE such as Visual Studio is a clearly better alternative, as it provides a cleanly integrated graphical interface for debugging and a streamlined build system designed specifically for C++. However, using Visual Studio as my primary editor will not allow me to write OCaml, LaTeX, PHP or Java code with reasonable ease, which is actually quite unacceptable. This makes Visual Studio a good choice for a specialized text editor (as it handles C++ and C# code quite well), but a lousy choice for a primary text editor.

And so, my point is that most existing editors are good specialized editors, but none of them qualify as a good primary editor, because they can't handle the breadth of everything I do.

Quote:Anyway, while I understand that you can gain a familiarity by sticking with a single editor, I think you might also find that specialized editors for a particular task work better than a single do-it-all solution for every type of thing you're editing.


This is not an argument against using Foo or Bar as a primary editor. This is an argument against the very existence of a primary editor, as opposed to a toolbox of specialized editors. I personally tend to only consider using a specialized editor when the project is large enough to gain something from it, and I routinely use Visual Studio for large C++ projects.

On the other hand, you must notice that in essence, Visual Studio is actually an unspecialized editor with specialized "plugins" for C# and C++, and Eclipse also works based on a "plugin" system which can support Java, C++, OCaml, and others. The same goes for emacs, which is an unspecialized editor with specialized "plugins" for C, C++, Java, PHP, XML, OCaml, LaTeX... Ultimately, the quality of a tool is a combination of that tool's general usability, combined with the efficiency of its specialized plugins.

I just use the tabs as spaces option in VS to keep any people that are picky about such things happy. Otherwise there was the possibility that someone assumed that a tab had so many spaces and someone else just put in tabs and that it won't be represented the same across different editors/setups.

If it is just me editing the file then if I have tabs in the code it doesn't really matter as I will keep it uniform.
Quote:Original post by ToohrVyk
Quote:Original post by Rydinare
Just for reference, other editors handle most of those.


I can't help but notice that you are missing my entire point and arguing for something else right now than you did in your previous post. If you remember your initial statement, you might notice that it was related to the choice of a primary text editor, namely the fact that emacs or vim are ridiculous for that purpose.

I certainly agree that, for the purpose of developing C++ code, a specialized IDE such as Visual Studio is a clearly better alternative, as it provides a cleanly integrated graphical interface for debugging and a streamlined build system designed specifically for C++. However, using Visual Studio as my primary editor will not allow me to write OCaml, LaTeX, PHP or Java code with reasonable ease, which is actually quite unacceptable. This makes Visual Studio a good choice for a specialized text editor (as it handles C++ and C# code quite well), but a lousy choice for a primary text editor.

And so, my point is that most existing editors are good specialized editors, but none of them qualify as a good primary editor, because they can't handle the breadth of everything I do.

Quote:Anyway, while I understand that you can gain a familiarity by sticking with a single editor, I think you might also find that specialized editors for a particular task work better than a single do-it-all solution for every type of thing you're editing.


This is not an argument against using Foo or Bar as a primary editor. This is an argument against the very existence of a primary editor, as opposed to a toolbox of specialized editors. I personally tend to only consider using a specialized editor when the project is large enough to gain something from it, and I routinely use Visual Studio for large C++ projects.

On the other hand, you must notice that in essence, Visual Studio is actually an unspecialized editor with specialized "plugins" for C# and C++, and Eclipse also works based on a "plugin" system which can support Java, C++, OCaml, and others. The same goes for emacs, which is an unspecialized editor with specialized "plugins" for C, C++, Java, PHP, XML, OCaml, LaTeX... Ultimately, the quality of a tool is a combination of that tool's general usability, combined with the efficiency of its specialized plugins.


I see where the confusion is. I meant "primary editor for C++". I apologize for the ambiguity of my statement. From what I'm talking about here, I was only referring to their C++ coding. I don't care if they use vi, emacs, notepad, etc... for editing non-C++ items, as it hasn't been an issue to date.

Aside from the terminology confusion, I believe we're generally in agreement.

This topic is closed to new replies.

Advertisement