Teaching Programming

Terry Reedy tjreedy at udel.edu
Mon May 3 13:32:14 EDT 2010


On 5/3/2010 9:38 AM, Samuel Williams wrote:
> Dear Chris,
>
> Thanks for reading further into the site.
>
> Yes, it is complicated to provide a good comparison. It isn't always
> accurate and I welcome feedback.
>
> Please be aware that orange does not mean problem - it simply means
> take note that there may be potential issues that you need to
> consider. It is highly subjective, so I appreciate your feedback. The
> red dot is when there is definitely an issue that needs to be taken
> into consideration. It isn't "Okay, Warning, Error" because it isn't
> possible to make this kind of judgement without being omnipotent.
>
> There are several reason why I decided to rate the syntax as not
> being simple. 1) Indentation model is not appreciated by everyone - I

Appreciation is orthogonal to simplicity.

> think its a good model, but feedback from some other people has been
> that they don't like it. Also, I've had perfectly good Python code
> fall to bits after editing in a different editor. I'm not saying that

I view this is a consequence of simplicity. Python does not have the 
complexity of usually redundant (but possibly contradictory) backup 
indication of structure. So to me, you are rating Python as not simple 
because it is too simple for some people for some purposes ;-).

> this was the fault of Python, but in an educational context it might
> be a problem, since people are fairly limited and don't understand
> these issues. 2) I don't think that the list comprehension integrates
> well with the rest of the language. It is an additional syntactic
> construct which seems to be separate from the rest of the language.
> It would be nice if list comprehension was implemented in a way that
> was more general, using a general closure syntax for example. This is

List comprehensions have been generalized in Python 3 to generator 
expressions and list/set/dict comprehensions. I do not know whether you 
rate Py2 or Py3 at your site, but for 'should I learn this language' 
comparision, Py3 would be fairest.

> just my opinion, and it might not be valid (I don't research this
> point very heavily).
>
> I appreciate that in general the Python syntax is good and concise.
> It is hard. Some teacher might want to consider these issues more
> carefully. Do you think I should change that spot to green? I don't
> have a problem with doing that, as long as it makes sense.
>
> Thanks for providing the syntax images, they are very interesting.

I chose Python over Perl (over a decade ago) partly because it seemed to 
me them to have a simpler, more consistent object model and system. 
Since then, the user class system has been integrated with the builtin 
type system, and the older separate class system eliminated in Python3, 
which, again, simplifies things.

It is perhaps worth noting that Python's object model, and consequent 
function calling protocol, dates back at least to Barbara Liskov's CLU 
language.

Terry Jan Reedy




More information about the Python-list mailing list