Larry Wall's comment on python...

Thorsten Kampe thorsten at thorstenkampe.de
Sat Sep 7 10:46:07 EDT 2002


* laotseu
>Rod Stephenson wrote:
>> Slashdot has a list of questions posed to Larry Wall (perl). When
>> asked his thoughts on other scripting languages, he makes the
>> following observation about python
>> 
>> "Python is cool to look at small bits of, but I think the "outline"
>> syntax breaks down with larger chunks of code. I'm with Aristotle on
>> the structure of discourse--a story should have a beginning, and
>> middle, and an end. So should blocks"
>> [...]
>
> def fun(args):
> #BEGIN
>      if ceci or cela:
>      #BEGIN
>          do_this(with_that)
>          [snip a lot of code]
>      #END
> #END
>
> So what the problem with blocks ?

Nope. Bad, bad readability, sorry.

#||<--- LOOK HERE, LARRY, THIS IS WHERE THE FUNCTION _*BEGINS*_!
def fun(args):
    #||<--- LOOK HERE, LARRY, THIS IS WHERE THE IF-CLAUSE _*BEGINS*_!
    if ceci or cela:
        do_this(with_that)
        [snip a lot of code]
    #||<--- LOOK HERE, LARRY, THIS IS WHERE THE IF-CLAUSE _*ENDS*_!
#||<--- LOOK HERE, LARRY, THIS IS WHERE THE FUNCTION _*ENDS*_!


Thorsten



More information about the Python-list mailing list