Label-Value (was: Re: Inheriting the @ sign from Ruby)

Dave Brueck dbrueck at edgix.com
Tue Dec 12 12:42:38 EST 2000


> > Tough for the new Python programmer, then.  It's nt fair to them.
>
> Actually, it's not really that hard for the new programmer,
> but maybe a little odd for a programmer coming from certain languages.

Right on the money! When you move to Python (or to any new language), you
have to leave behind some of the mental baggage that goes with the former
languages. If you look at Python from a complete newbie perspective, it's
not so hard to understand. Everything is an object, and variables refer to
them. It stopped giving me problems once I forced myself to stop thinking in
terms of pointers. :)

Talking in terms of pass-by-value/reference might be a good way to quickly
transition from a language like C++, but it's a shortcut that will cost you
in the long run, so whoever is confused should get away from that way of
thinking ASAP. It's only natural to try to fit something new into the
context of what you already know (that helps humans adapt quickly), but the
danger is that your thinking won't ever progress. It's sooo common to see
"C++ programmers" that still program in C - they may use the syntactic
features of C++, but their thinking (and as a result, their programs), are a
far cry from object-oriented.

-Dave





More information about the Python-list mailing list