Compare source code
usenet-nospam at seebs.net
Wed Nov 3 03:40:11 CET 2010
On 2010-11-03, D'Arcy J.M. Cain <darcy at druid.net> wrote:
> On 03 Nov 2010 01:20:40 GMT
> Seebs <usenet-nospam at seebs.net> wrote:
>> However, I have probably seen all of two or three bugs ever related to
>> mis-indented C, and I've had various things screw up or wreck indentation
> Really? I have never seen bugs in C related to indentation. I have
> seen plenty related to braces. What I have seen is bugs hidden by the
> indentation not matching the block structure.
Right. That's *related to* indentation -- it wouldn't be there (we hope)
had the indentation been right.
> Wrong indentation in
> Python *is* a bug. There's no other visual signal to hide the error.
Sure, but there's also no way for you to spot that something looks
suspicious. In Python, if something is misindented, it does what you
told it to do, and there's no way for you to tell, by looking at it,
that it isn't what was intended. In C, if something is misindented,
it does what you told it to do, but it's obvious looking at the code
that something went wrong.
> But I can see the other end of the block in Python. I don't need any
> tricks to make sure that it is the end. And if your block is too big
> to see the structure easily then that just means that some code should
> be factored out to a method.
This level of dogmatism about what should always be the case is not
conducive to good software engineering practices. It is not obvious to
me that it's *always* the case.
Copyright 2010, all wrongs reversed. Peter Seebach / usenet-nospam at seebs.net
http://www.seebs.net/log/ <-- lawsuits, religion, and funny pictures
http://en.wikipedia.org/wiki/Fair_Game_(Scientology) <-- get educated!
I am not speaking for my employer, although they do rent some of my opinions.
More information about the Python-list