Python syntax in Lisp and Scheme

Jan Rychter jan at rychter.com
Fri Oct 17 00:17:08 EDT 2003


>>>>> "Alexander" == Alexander Schmolck <a.schmolck at gmx.net> writes:
 Alexander> prunesquallor at comcast.net writes:
 >> mike420 at ziplip.com writes:
 >>
 > I think everyone who used Python will agree that its syntax is the
 > best thing going for it.
 >>
 >> I've used Python.  I don't agree.

 Alexander> I'd be interested to hear your reasons. *If* you take the
 Alexander> sharp distinction that python draws between statements and
 Alexander> expressions as a given, 
[...]

How is that a given?

I've recently tried to teach someone programming. I thought "Python has
an easy syntax, let's try that". Well, guess what -- she had a really
hard time. Inconsistency was a real problem, as was the confusion
between "statements" and "expressions". When you start programming in
Python, you get really confused -- does this call have side effects or
not? You can't tell by looking at the call. A simple operation of
appending strings can cause a lot of confusion.

Also, the syntax was confusing. Yes, indenting the statements is
easy. But the dot notation is all but obvious, especially with its
inconsistent application in Python. And where did those square brackets
suddenly come from and when do I use them?

Mind you, this is from a beginner's point of view. Most of you look at
the language syntax from the point of view of a person knowing at least
one (or more) programming languages and having the basic programming
concepts drilled in. It's very different for someone who does not have
that background.

An experiment has shown that Scheme was *much* easier to grasp. In
Scheme, you can clearly see where side-effects occur and there are less
syntax rules to follow.

IMHO, Python's supposedly easy syntax is a red herring. It's an argument
pushed by computer-literate people and simply doesn't hold for
beginners.

--J.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 194 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-list/attachments/20031016/156bbffc/attachment.sig>


More information about the Python-list mailing list