Larry Wall's comment on python...
Ken Seehof
kseehof at neuralintegrator.com
Thu Sep 12 01:34:40 EDT 2002
At 07:46 AM 9/7/2002 Saturday, Thorsten Kampe wrote:
>* 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
Definitely not. Too wide by far. You need to reduce the indent to one space.
#||<--- 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*_!
- Ken
More information about the Python-list
mailing list