F
Ficus Elastica
When writing C code, which editor is better, vi or emacs, and why?
Ficus said:When writing C code, which editor is better, vi or emacs, and why?
Ficus said:When writing C code, which editor is better, vi or emacs, and why?
Martin said:This is the kind of post designed to start a flamefest.
The editor you are more comfortable with is better.
It is better because it is the one you are more comfortable with.
Many people suffer from "first-editor syndrome" (and "first-language
syndrome" and "first-OS syndrome"). Whatever tool they learned with
always has some feature that the new tool lacks.
My first editor apart from coding sheets was TECO.
It had a number of
features missing from almost all modern editors. I recommend it. My
first language was ALGOL-60. Very few modern languages have
call-by-name. I recommend it.
0 out of 10
When writing C code, which editor is better, vi or emacs, and why?
Ian said:Martin Ambuhl wrote:
PHP (along with other "scripting" languages) does. With a little help
from the environment and an extra level of indirection, C can as well.
Erm ... no? I think you're thinking that call-by-name is either
call-by-reference, or call-by-string-and-eval.
Suppose in a call-by-name language we write
int jensen( int index, int expr )
{
int result = 0;
for (index = 0; index < 10; index += 1) result += expr;
return result;
}
int main() { int i; print jensen( i, i * i ); }
This will print 45. Bearing in mind that `i * i` stands for any
expression that involves `i`, including ones that access arbitrary
values from the same environment as `i`, I don't think that "a little
help from the environment and an extra level of indirection" are
enough.
Erm ... no? I think you're thinking that call-by-name is either
call-by-reference, or call-by-string-and-eval.
Suppose in a call-by-name language we write
int jensen( int index, int expr )
{
int result = 0;
for (index = 0; index < 10; index += 1) result += expr;
return result;
}
int main() { int i; print jensen( i, i * i ); }
This will print 45.
Bearing in mind that `i * i` stands for any
expression that involves `i`, including ones that access arbitrary
values from the same environment as `i`, I don't think that "a little
help from the environment and an extra level of indirection" are
enough.
There's nothing original about a vi vs. emacs troll. Everyone knows
that nano and ed are the Un*x editors to use.
Anthony Fremont said:There's nothing original about a vi vs. emacs troll. Everyone knows that
nano and ed are the Un*x editors to use.
why? I made it 285...
I'm a thicko, that's why. I summed the values of `i`, not the values
of `i * i`, when I did it in my turnip.
Martin Ambuhl said:This is the kind of post designed to start a flamefest.
The editor you are more comfortable with is better.
It is better because it is the one you are more comfortable with.
Many people suffer from "first-editor syndrome" (and "first-language
syndrome" and "first-OS syndrome"). Whatever tool they learned with
always has some feature that the new tool lacks.
My first editor apart from coding sheets was TECO. It had a number of
features missing from almost all modern editors. I recommend it.
Sometimes full screen is convenient, like taking something that was posted
here and reformatting it into something legible.
I must confess that I use Ultraedit under windos, I like the syntax
hilighting.
Richard said:Ficus Elastica said:
Whichever you like best, because it's the one you like best.
But I have never used neither. But on the computer I have to use that's
all that's available and worse, there's multiple incarnations of both:
vi: vi, nvi, vim, elvis
emacs: xemacs, GNU/emacs, lucid emacs, joe(?)
This is so confusing!!
Which one is best for C code?
My guess is that there are two editors and the rest are shell scripts that
invoke the two with different arguments. Check your man pages.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.