An interesting read this, I thought. Most I agree with, some I don't.
It occurred to me that a few of the issues raised might point towards ways of improving Python as an introductory language. (I'm not talking about Java here 'cos I consider Java to be totally inappropriate for beginners.)
loopstatement. The standard idiom for this in Python is
while 1:, which I can see a beginner mistaking for something happening once. Perhaps better these days would be
while True:, but again, I can see a beginner thinking - while what is true?
listrefers to the 2nd item of a list is likely to be a problem for a newcomer. But what to do about it? Apart from the practical impossibility of changing something like this in an existing language, (can you imagine the furore on c.l.py if this was suggested!), it's also the case that in practise this is a more convenient notation. If beginners started off with 1 offsetting, and had to move to zero offsetting later, well, that's even harder. And I speak from experience here, coming from RPG.
On reflection, it seems that none of these would have any chance of making it into Python. Only the non-terminating loop construct would be reasonably backward compatible, and while
while True: is ugly, it works. Ah well...
One thing I didn't agree with, (as you might expect from a Python fan) is the paper's assertion that using indentation to specify scope is an example of 'detrimental cleverness'. It refers to 'useful redundancy' between delimiters and indentation. I don't see it as useful redundancy, I see it as potentially confusing. If the two don't match, which is correct (in terms of the programmers intention)? Redundancy is almost always A Bad Thing in code, and having both delimiters and indentation is no exception.
What I don't see, though, is any indication that all this is anything more than personal opinion. Informed opinion, yes, but opinion nevertheless. Real useability studies would be good.
Via iamcal.Posted to Software development by Simon Brunning at February 20, 2003 01:29 PM