On Nov 3, 8:33 pm, Joe Strout <[EMAIL PROTECTED]> wrote:
> On Nov 3, 2008, at 5:27 PM, Marc 'BlackJack' Rintsch wrote:
>
> > Maybe this is a surprise for you, because we haven't discussed this in
> > much detail in this group lately, but it applies to Python which does
> > call-by-object or call-by-sharing.  ;-)
>
> There's no such thing.  Those are just terms made up by the Python  
> community to in place of the more standard "call-by-value" terminology  
> to make Python seem more mysterious than it really is.  I guess you  
> can call it "purple bananas" if you want, but the behavior is exactly  
> the same as what every other language calls call-by-value.
>
> But I really am trying not to continue this debate.  So that's my last  
> reply about it for tonight, I promise.  :)
>
> Cheers,
> - Joe
> <http://www.strout.net/info/coding/valref/>

Here is the link to Barbara Liskov's paper, 1992, linked on
effbot.org.

"...arguments are passed "by object"; the (pointer to the) object
resulting
from evaluating the actual argument expression is assigned to the
formal."

http://publications.csail.mit.edu/lcs/pubs/pdf/MIT-LCS-TR-561.pdf

However a Google search for "call by object", in quotes, returns
mostly Python-related links, which I find somewhat suspicious.

The search for call by sharing was more successful:

" Call by Sharing
The caller and called routine communicate only through the argument
and result objects; routines do not have access to any variables of
the caller....  if a routine assigns an object to a formal argument
variable, there is no effect on the caller."

http://www.pmg.csail.mit.edu/papers/thetaref/node34.html

That's an accurate description of Python.  If VB.NET does the same
thing, I'll just assume that the designers named their keyword "ByVal"
instead of "ByShare", either to accommodate immutable primitives
(numbers), or to keep the keyword short.

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to