Finding the instance reference of an object

Douglas Alan doug at
Fri Oct 31 17:37:57 CET 2008

greg <greg at> writes:

> Douglas Alan wrote:
>> greg <greg at> writes:
>>> This holds for *all* languages that I know about, both static and
>>> dynamic.
>> Then you don't know about all that many languages.  There are
>> languages that use call-by-name, and those that use
>> call-by-value-return.  Some use call-by-need and others do
>> call-by-macro-expansion.  Etc.
> I didn't mean that these are the only two parameter passing
> mechanisms in existence -- I know there are others.

I don't follow you.  You stated that once you understand how
assignment works, you understand the calling mechanism.  That's just
not true.  Algol, for instance, did assignment-by-value but

>> If I tell you, for instance, that Java, Python, Ruby, JavaScript,
>> Lisp, and CLU all use call-by-sharing, then I have said something that
>> makes a similarity among these languages easier to state and easier to
>> grasp.
> If you told me they use "assignment by sharing", that would tell me
> a lot *more* about the language than just talking about parameter
> passing.

Not really.  Call-by-sharing virtually implies that the language does
assignment-by-sharing.  (I know of no counter-examples, and it is
difficult to see how a violation of this rule-of-thumb would be useful
in any new language.)  Stating that a language does
assignment-by-sharing does not imply that it does call-by-sharing.  Or
at least not exclusively so.  Cf. certain dialects of Lisp.  Also C#,
which supports a variety of argument passing strategies.


More information about the Python-list mailing list