Adding static typing to Python

John Roth johnroth at ameritech.net
Sat Feb 23 09:14:27 EST 2002


A bit of a linguistic nit below:

"Quinn Dunkan" <quinn at regurgitate.ugcs.caltech.edu> wrote in message
news:slrna7dhbm.5et.quinn at regurgitate.ugcs.caltech.edu...
> On Fri, 22 Feb 2002 16:14:03 +0000 (UTC), gbreed at cix.compulink.co.uk
> <gbreed at cix.compulink.co.uk> wrote:
> >Quinn Dunkan wrote:
> >

> >> I'm not even sure why the smalltalk style 'object followed by
method'
> >> notation
> >> caught on, especially since 'function followed by args' has always
been
> >> firmly entrenched.
> >
> >It happens to match the usual English word order: "the class's
method"
> >rather than "the method of the class".  If the field had been
dominated by
> >French speakers, perhaps it would have been the other way round.
>
> Yeah, I've heard postfix function application described as
"subject-verb" and
> prefix application as "verb-subject", which indicates that people are
thinking
> linguisticly.  But I still think English has at least a strong
orientation
> around "the area of the circle" or "rotate the circle" or "the sorted
list" all
> of which are verb-subject.  Another hypothesis is that OO-heads wanted
to
> emphasize that their programs are conceptually data oriented, rather
than
> function oriented.  Could be the same reason they invented all that
funny
> "message" and "responds to" terminology.

Your first and third examples do not include a verb, so subject-verb or
verb-subject aren't really relevant. The actual linguistic issue is
whether noun
clauses are written modifier-noun or noun-modifier.

Writing a method call as
object.attribute.attribute.attribute(parameters)
has the distinct advantage that it is much easier to emit code: that's
the
order in which the program has to follow the object chain. Doing it in
the other order requires the compiler or interpreter to maintain a stack
before emitting code or executing the instruction.

I've never understood "message" as terminology either. I've
always made the totally unsupported assumption that way back
in the beginning, someone thought of each object instance as being
a separate thread, so that message actually meant something other
than 'function call with a misleading name.'

John Roth







More information about the Python-list mailing list