Python slang
Rustom Mody
rustompmody at gmail.com
Wed Aug 10 13:34:48 EDT 2016
On Wednesday, August 10, 2016 at 9:31:40 PM UTC+5:30, Anders J. Munch wrote:
> Lawrence D’Oliveiro:
> >> [...] as much like C++ as
> >> possible.
> >
> > Nevertheless, Python copied the C misfeature [...]
>
> You segued a little too easily from C++ to C. When talking language
> evolution and inspirations, they are entirely different things.
Talking of too-easy-segueing:
Python’s inspiration and origin is ABC
Whose assignment looked like
PUT expr INTO var
This has the salutary effect
- Of being l-to-r (the only other such case I know is gas mov)
- And of course of not making a misleading pun between equality and assignment
Of course from a software engineering pov, writing say a 1000 line program
with > 500 assignments written with PUT…INTO is of course ridiculous
But from a pedagogy pov here is a recent post (set) by a beginner that shows
how much this pun costs in beginner confusion:
https://mail.python.org/pipermail/python-list/2016-June/710595.html
https://mail.python.org/pipermail/python-list/2016-June/710668.html
And for completeness (since there seems to be the notion that C and like
are the only natural ones around) here are some extant alternatives:
Pascal (and Algol family generally) var := exp
Early Basic LET var = exp
ABC PUT exp INTO var
Lisp(scheme) (setq var exp) (set! var exp)
Assembly mov var, exp (gas) mov exp, var
APL var ← exp
More information about the Python-list
mailing list