[Edu-sig] Using objects early was Procedural front end for Zelle's graphics.py

Dethe Elza delza at livingcode.org
Thu Feb 8 06:32:28 CET 2007

On 7-Feb-07, at 7:57 PM, kirby urner wrote:
> Graphics are paradigm objects.  It's very lazy to revert to procedural
> techniques in the face of a language that offers so much more.

You're starting to lose me kirby.  I'm sympathetic and agree that  
Python makes using (note: not necessarily creating new) object as  
simple as procedural programming, in part because using objects *is*  
just procedural programming.  There is nothing magical about object  
in Python, which is part of why it is such a great language and  
supports many programming styles, including (but not limited to)  
procedural, functional, object-oriented, logical and declarative.

> Stick to FORTRAN maybe?

Ad hominem attacks aren't going to convince anyone.

>> You wrote: "we're in a dark age right now".  Let me agree and take
>> this statement to the extreme.  Forget about OOP.  We need to start
>> teaching kids about qubits, and the bra and ket notation.  This is
>> where the future lies, with quantum computing and quantum
>> cryptography.  Furthermore, the notation is *a lot* simpler than the
>> "rib" syntax which you are so fond of, as long as you only deal with
>> finite dimensional spaces.    Yet, I would not argue that this would
>> be appropriate for a CS0 course.

Not until we have the equivalent of Python for quantum computing  
anyhow %-)

> Your analogies of OO with advanced mathematics, thereby suggesting
> that OO should be seen as beyond the reach of CS0 is precisely the
> attitude I disagree with.

I don't see anyone arguing that OO is "beyond the reach" of CS0.  I  
see them arguing that it's only one semester to introduce a *lot* of  
new concepts, only some of them having to do specifically with  
programming and computer language notation.  Decisions have to be  
made about what to cover.  Sometimes, for some teachers, OO makes the  
cut in some form or another.  But OO is not some magic bullet that  
*must* be taught in order to learn about computers.  Remember what  
Djikstra (I think) said, "computer science is as much about computers  
as astronomy is about telescopes."

> It's woven into our everyday patterns of thought, OO is, including  
> ideas
> of inheritance, even polymorphism.

This is where I disagree most strongly.  When OO was introduced it  
was often taught like this, which resulted in a huge amount of  
confusion, because what we model with OO has *very little* to do with  
objects as we normally think of them in the real world.  Making that  
assertion to students can be very misleading.

And even if we wanted to make a case for Python objects being in some  
way similar to real world objects that we're all familiar with: the  
real world is parallelism: things don't happen in a given order,  
they're all happening at once.  But that doesn't mean we should teach  
threading or other forms of parallelism in CS0 (unless we're teaching  
Erlang rather than Python).

Actually, Lynn Andrea Stein does propose introducing threads early on  
in CS101 (http://faculty.olin.edu/~las/2001/07/www.ai.mit.edu/people/ 
las/papers/cs101-proposal.html), but that's in a CS-majors class at  
MIT (and in Java).

> What a great opportunity to connect ordinary patterns of thought with
> a formal, machine-executabe language.  What a waste to ignore this
> opportunity.

It seems to me that "connecting ordinary patterns of thought with a  
formal, machine-executable language" is exactly most of this thread  
has been about, and what draws each of us to Python.  Whether that  
involves dot notation or "ribs" from day one is a rather trivial  
matter of syntax, IMHO.

> I feel sorry for students who get suckered into taking such CS0s and
> wish they wouldn't get their first impressions of Python from such
> courses.

This just comes across as sour grapes and more ad hominems.  The  
important thing is to teach the *concepts*, not whether they are  
strictly OO or even whether they are Python.  The syntax is just a  
means to an end.  Python has a rather elegant syntax, which helps to  
keep it out of the way of the actual material, as opposed to Java  
where you have to struggle through layers of syntax and mechanisms in  
order to get even simple things done.  And Java's insistence on  
enforcing all objects all the time just gets in the way when objects  
aren't what you need.


You know, Hobbes, some days even my lucky rocketship underpants don't  
help. --Calvin

More information about the Edu-sig mailing list