[Edu-sig] Setting a variable's value

John Zelle john.zelle at wartburg.edu
Thu May 11 21:48:18 CEST 2006


On Thursday 11 May 2006 09:18, kirby urner wrote:
> > I don't believe in adding special notation specifically designed for
> > beginner's sake - even though I am dedicated in making Python as easy
> > to learn as possible.
> >
> > André
>
> Right

Agreed. But I personally feel that = for assignment _is_ a bad idea, precisely 
because it does conflict with an older, equally valid, completely entrenched, 
and closely related uses of this symbol. One of the most common mistakes I 
still see (and make) is using = in conditions where == is needed. At least 
that's a syntax error in Python. The use of = is a poor desgin decision made 
by earlier languages and  then borrowed by Python. I can live with it, but 
it's still a mistake.

> . 
>
> Also, math notations which went to the trouble to be self-executing on
> a machine (like APL), in some sense deserve our respect for their
> precision and consistency.
>
> Maybe it's plain old, non-executing (dead) algebra that should change.

Give me a break here. If Python had used + to mean subtraction, would you say 
that's not a design flaw even though + means addition everywhere else in the 
world? That's just silly.  = means equality, always has and always will in 
mathematics. Why should that change?

> Phase in Python notation much earlier and discuss the old pre-Python
> use of the assignment operator as "from a different namespace"
> (perhaps deprecated).
>
> Just because a bunch of oldies used typography the way they did,
> doesn't mean we have to warp everything we do in future to be backward
> compatible.
>
> I look at self-executing math notations as defining a cutting edge,
> not as poor imitators of some obsolote text book way of doing things.

But self-executing is not the same as self-manipulating. Algebra is much more 
a symbolic activity than it is a numeric activity. We should use notations 
for algebra that best lend themselves to algebraic manipulation, not those 
that are necessarily best for computing results.

> In fact, why do we teach "algebra" at all in the old fashioned sense?
Because you need to be able to do algebra to figure out how to write (good) 
code. It doesn't matter much what system is interpreting that code.

> In my view, tackling this set of topics without a computer language is
> indefensible except in cases where some invading/conquering power has
> an agenda of keeping the kids dumb (in which case, the *real* schools
> have to go underground, as is happening in the USA).

I fear the day that my students have no exposure to algebra outside of the 
sphere of computer programming. I agree with Kirby that teaching with a 
programming approach can be a great complement to traditional approaches, but 
I don't think that work on the computer produces the exact same skill set, 
especially pattern recognition and symbolic thinking, that plain old algebra 
and geometry do. Good geometry students make good programmers.

--John

-- 
John M. Zelle, Ph.D.             Wartburg College
Professor of Computer Science    Waverly, IA     
john.zelle at wartburg.edu          (319) 352-8360  


More information about the Edu-sig mailing list