Larry Wall's comment on python...

brueckd at tbye.com brueckd at tbye.com
Mon Sep 9 11:02:57 EDT 2002


On 8 Sep 2002, Brian Slesinsky wrote:

> He's repeating the standard newbie complaint.  However, I think the
> fact that so many people have repeated this for so long is
> significant.  Long-term Python programmers tend to forget how weird it
> is to some newcomers to end a function or class just by *stopping*. 
> It feels abrupt and rather fragile, particularly when you don't have a
> firm grasp of the language.  If newbies have complained for this long,
> the complaint's not going away, and if we're serious about making
> Python easy to pick up it might be good to listen.

Yes, the fact that so many newbies complain about it is very significant.  
Perhaps we need to do a better job of presenting the concept. For example,
instead of tossing it out there and then defending against complaints
perhaps it would be better to take the offensive: first make a case for
why the "normal" way to delimit blocks has its drawbacks, and then present
the Python way as a solution to a problem.

But just because people consistently complain about something does not
mean the answer is to bow to their wishes. From an arrogant point of view,
they're newbies, so what do they know? ;-) Seriously though, I enjoy
Python because it _is_ different - and I usually derive benefit from the
ways in which it is different (i.e. - it's not different for arbitrary or
random reasons). It's significant that lots of newbies complain about "no
curly braces", but it's as least as significant that once people use it
for awhile they tend to end up liking it.

> Of course it's unnecessary and should be entirely optional.  Putting
> an "end" after every block would certainly be overly verbose and bad
> style.  But ending major blocks in a way that's syntax-checkable might
> catch the occasional indentation error and/or make error messages

Well, as you know you can always do an "# end" comment which really gives 
much of the same benefit. At the bottom of my Emacs window it tells me 
which block I'm closing (e.g. "Closes block: ...try:"), other editors 
probably do the same. Also, it seems like whenever it's not readily 
apparent which block I'm in, then the _real_ problem is sloppy code on my 
part.

-Dave





More information about the Python-list mailing list