[Edu-sig] Overloading (was Re: more on "variable names")
kirby.urner at gmail.com
Wed May 27 03:19:05 CEST 2009
On Tue, May 26, 2009 at 5:28 PM, Edward Cherlin <echerlin at gmail.com> wrote:
> On Sat, May 23, 2009 at 7:43 PM, kirby urner <kirby.urner at gmail.com> wrote:
>> I filed the following quick comment after viewing a six minute
>> tutorial on variables and values at ShowMeDo.
>> The video:
>> My comment:
>> idea that values are "stored into" a variable is less the metaphor in
> Yes, it is a relic of assembly language.
Or maybe it works well for many other languages too, as it's certainly
a commonplace in CS, to talk about variables as little boxes, with
value contents. I guess you could say C, FORTRAN etc. are just
glorified assembly language, so your point remains.
I like teaching that to each language their corresponds a set of short
"cartoons" laying out ways to visualize that won't get you in trouble.
It's not the case that every language is an approximation to the same
underlying concepts, but rather that each clear and expressive
language has a unique take, a strong individuality.
PHP has a whole different idea of copying, when stuff in memory
duplicates or doesn't. I was surprised when I started reading about
it. "This isn't Python" I was thinking. But why should have that
surprised me? APL isn't Python either. Only Python is Python.
> A variable is not a section of memory. It is a pronoun which can have
> different referents at different times. One object can be referred to
> by many different personal names and a variety of pronouns at the same
> time. This is easier to explain in Japanese, which has numerous and
> ever-shifting sets of pronouns. "I" in English can currently
> correspond to
> o watashi
> o atashi
> o atai
> o boku
> o ore
> Historically, people could also have three, four, even a dozen
> personal names, some chosen for various private or public purposes,
> some awarded by teachers, some (rarely) awarded by the Emperor, and so
Hmmmm, not used to thinking of names as pronouns, but yeah, handles, I
think of X-box remotes, other game consoles, in that now that I've got
a handle ----- (string) ----> to some parade balloon, I'm able to
query it as to air pressure, altitude, even have a small amount of
write access (steering responsibility).
In client = server, I'm thinking it's pull more than push, i.e. when I
name an object, I'm not expecting things to "just happen to me" so
much as my code gets to puppet the object or at least read its
attributes (when it gets around to it, per flow of control).
Python is more the standard imperative language in that way. On the
other hand, with callbacks and sockets, everything gets a lot more
"springy" i.e. every client is like a server (responsive) and every
serve like a client (inquisitive).
I think what you say about multiple identities is way more true today
of your "average cyberian" in that we have our multiple monikers or
handles or facebook identities, of necessity given the technology, so
a world of masks, more like kabuki if that makes any sense (you sound
way more knowledgeable about Japan).
>> which is more about assigning or binding names to objects with
>> the assignment operator (=). The problem with "store into" is then
>> its hard to picture many names for the same object, yet that's easy
>> when you think of a balloon with many strings.
>> For example, the so-called "equal sign" (=) would be better called an
>> "assignment operator" as most of us here do.
> We would do better to use a different symbol entirely. The only reason
Not sure who the "we" is, but I'm guessing you're right that a
significantly sized subculture would wanna do that.
> for the massive overloading practiced in conventional programming
> languages is the utterly obsolete ASCII character set. APL has used
> the left-pointing arrow '←' for assignment for decades, and treated
> '=' as a Boolean function returning a truth value. Just as APL has
> used the correct '×' and '÷' rather than overloading ASCII characters
> further. J distinguishes the function '=' from assignment '=.'.
Dunno that Latin-1 is "utterly obsolete" is just literally
bottom-of-barrel bit patterns with lots of invested hours, so keeping
it working is likely a high priority in many a silo.
However, green field development with native naming, sprinkling of
Python keywords, is very doable in 3.x, what I've been playing with
along with an invisible army of nameless others I'm sure.
osgarden.appspot.com was a meager attempt, is actually just 2.5 so I'm cheating.
But then you're talking about sky's the limit whole other languages
with not a lick of Latin-1, and yeah, I expect more of those too.
Lots of biodiversity. These industrial strength languages are a lot
of work though, huge time sinks, like pyramids, so tossing a little
language out there and expecting it to snowball needn't be "every kids
Just having some hard fun in a lexical sandbox is an end in itself, is
one of our little commercial messages. That's preaching to the choir
in geekdom, but helping strangers take delight in our tools sometimes
takes clever packaging (the XO is very clever packaging for Python,
the way I see it).
>> To make this link stick we could explain how the two parallel lines
>> represent "opening a channel to" i.e. now this name (on the left) will
>> be able to communicate with the object on the right (some result of
Assuming -1 because you don't like the metaphor, aren't really
expecting Python to adopt APL like new syntax (unlikely -- Guido
doesn't seem to fight his Latin-1 heritage the way some do).
>> PS: do Python's where Prada?
>> Edu-sig mailing list
>> Edu-sig at python.org
> Silent Thunder (默雷/धर्ममेघशब्दगर्ज/دھرممیگھشبدگر ج) is my name
> And Children are my nation.
> The Cosmos is my dwelling place, The Truth my destination.
> http://earthtreasury.org/worknet (Edward Mokurai Cherlin)
> Edu-sig mailing list
> Edu-sig at python.org
More information about the Edu-sig