Compare source code
usenet-nospam at seebs.net
Thu Nov 4 01:00:04 CET 2010
On 2010-11-03, Michael Torrie <torriem at gmail.com> wrote:
> I suggest, then that Pascal or Ruby would suit your needs better than
In the absence of network effects, I'd just be using Ruby. I have reason
to work with projects that have a lot of existing Python, though, so I
use it too.
> As for refactoring code, vim makes it really easy to move blocks in and
Yes, though I mostly use nvi, same thing -- basically. The issue I've
had is that the automatic-tab thing (which I actively want for everything
else I edit) tends to make it quirky.
> The only time I could see this becoming an issue is if functions
> or blocks of code are too long to see on a page at once. If this is the
> case, break them up. Sounds to me like your problems with refactoring
> and indention in python could be do to these kinds of design issues.
> Having curly braces certainly doesn't help in these situations either.
> More than once I've had C code I was refactoring that broke due to the
> fact that while trying to move blocks around I misplaced a brace, an
> issue I never have in Python.
For me, I'd rather have the compiler choke because I have mismatched
braces than have the code run apparently just fine except that something
has unintentionally moved in or out of an else clause because there was
no marker. I've had both happen, probably.
> In the meantime, whitespace structure is one of the things about Python
> that I like the *most* about the language. Being able to crank out
> executable pseudo-code is pretty addictive. And I never write
> pseudo-code on paper with begin and end blocks cause it's too much
> effort when scribbling by hand.
I never write on paper anyway. :)
Anyway, I'm not disputing that there are things that it makes nicer. I'm
just observing that there exists a category of failures which is completely
unique to Python, which no other language (except BF, which I'm not sure
I ought to count) has, which tends to show up occasionally until you've
gotten all the changed tools and habits, and even then can show up when
dealing with other people who use tools which, well, work perfectly for
everything else. But not for this.
Only other tool I know with a comparable dependance on spacing is Makefiles,
and I have never in my life met someone who used them and didn't think
that was a loathesome error which should never have made it into
production code. Python's not nearly as bad, actually. :)
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