Whitespace as syntax (was Re: Python Rocks!)
Evan Gibson
egibson at connect.com.au
Wed Feb 9 21:05:20 EST 2000
On Wed, Feb 09, 2000 at 07:53:03AM -0800, Paul Prescod wrote:
> Thomas Hamelryck wrote:
> >...
> > Because eyeball retraining can be worth it sometimes.
>
> That's something you learn after trying a half dozen or so radically
> different languages. The average programmer will never come to that
> recognition.
At Uni I came across Forth, Fortran, Pascal, C, C++, Machine Code, Lisp,
Perl, Rexx, Structured Basic...
I very quickly got to the point of not thinking in any particular language
and just scribbling down algorithms on pieces of paper in some thrown
together amalgamation of languages. When it came to implementation time
I'd just interpret that into whatever language I needed, but I didn't
_think_ in those languages so I wasn't restricted when it came to moving
between them.
Imagine my surprise when I came across python and it was almost IDENTICAL
to the version of pseudo-code I used to use (Except for putting colons at
the end of "if" statements!). When writing things down on paper you USE
indenting, because it's far cheaper in writing time than curly braces are
and easier to see at a glance how things work. (Especially when your
writing is as messy as mine. Whitespace is far more noticable than trying
to work out whether some obscure piece of scribble is a brace or a question
mark.)
To me whitespace indentation is one of the best features of python. It
makes python almost the same as the make-believe programming language I
actually think in.
The only things it took _me_ time to get used to was the appropriate use
of "self" and the difference between global and local namespaces.
--
Evan ~ThunderFoot~ Gibson ~ nihil mutatem, omni deletum ~
May the machines watch over you with loving grace.
More information about the Python-list
mailing list