But why ?
Posted Oct 31, 2006 16:04 UTC (Tue) by
mikov (subscriber, #33179)
In reply to:
But why ? by fooker
Parent article:
GNU emacs 22 goes into pretest
You don't seem to understand my point at all. I don't want to start a
religious war- as I said, it is as much about habit as it is
about logic. I however have the advantage of having extensively used both
ways of editing. I am replying not show that you are wrong, but to explain
my position and hopefully to prove that it is at least as valid. It is
certainly more logical.
> I'd like to move from the end of line to the beginning of the next
line.
>I'd like to add text to the end of line.
>I'd like to join two consecutive lines.
I agree this is a valid reason. This is what the 'end' key is for, but if
you feel that you may have to press it too often (not in my experience,
but I am subjective), then this mode of editing is not convenient for you.
>I'd like to see differences between two revisions of a file.
As I said (and you obviously ignored), editors have the option to remove
the invisible spaces at the end of a line automatically. This option
should be on at all times when editing software in any programming
language that I know.
> Each scenario is pretty common when programming, and having extra
whitespace inserted randomly at the end of line by the editor is Bad
Thing(tm) in each case (how does a program know when whitespace at the end
of line matters and when it doesn't).
Space is not inserted randomly. Why would it be inserted
randomly ?? I believe I addressed the other points too.
>Like having whitespace appearing magically at the end of line?
You keep repeating that, but it is simply not true. The _only_ way for
more spaces to appear is if you press a _non-space_ character somewhere
after the physical end of the line. Spaces are inserted between the end of
the line and the character your pressed. Is that so hard to understand ?
How else could it be ?
You seem overly concerned with spaces - they are ignored by all
programming languages (including Python), for god's sake. Also, they are
invisible. You should not have to think about them at all.
> Yes, indeed. So terrible that Guido van Rossum copied the mistake to
Python. The "shape of the line" is very important when programming in any
language. That's why we indent our code and group related functionality by
adding empty lines.
I feel silly when saying this, since it is obvious, but Python cares about
spaces _at the beginning of the line_. The spaces at the end of a line,
even if they are not automatically removed (which they are!), are
completely and totally irrelevant in all programing languages. This has
absolutely nothing to do with indentation.
Empty lines have nothing to do with it either - an empty line is equally
as empty if it has spaces.
(
Log in to post comments)