Re: why cannot assign to function call
- From: John O'Hagan <mail@xxxxxxxxxxxxxx>
- Date: Tue, 30 Dec 2008 14:21:29 +0000
On Tue, 30 Dec 2008, Aaron Brady wrote:
[...]
On a technicality, to avert a flaming, "change the value of 'b'" is an
ambiguous phrase. There are two interpretations of "change what 'b'
refers to" and "change what 'b' refers to". Even in spoken language,
I don't think that emphasis can resolve them either.
One means, 'make a change in the world, in the actual configuration of
such and such actual matter.' The other means, 'update the axioms the
speaker is using to communicate to the listeners. (Such and such will
no longer refer to such and such; it will refer to such and such;
accept this and reject that.)' To make an observation, reference is a
purely linguistic phenomenon.
I, for one, am at a loss for how to disambiguate it. I'm open to
suggestions.
I think you've already done so quite clearly. But I suspect the ambiguity
centres on the word "change" - in the first interpretation it means "alter"
(the object in place), in the second, it more precisely means "exchange" (one
object for another).
I'd be interested to know to what extent this ambiguity exists in languages
other than English - as a somewhat relevant example, ambiguities in English
around the verb "to be" ("I am Fred", "I am tall", "I am hungry"; i.e.,
identity vs. attributes vs. state) disappear in other languages which use
different verbs in each case.
On a (philosophical) side-note, I wonder if this is a real ambiguity: while
the statement that the name "b" now refers to a different object is
clear-cut, the other interpretation, that the object itself has changed but
is somehow still the same object, is a bit of an ontological minefield.
Fortunately, unlike the murky world of philosophy, Python (AIUI) simplifies
this question by simply declaring that yes, in the case of mutable objects,
we may say that we are still referring to the same object although we've
changed it, and no, in the case of immutable objects, we may not, and must
exchange it if we want a different "value" (a word too fraught with ambiguity
in this context to use unquoted!).
The sometimes useful fuzziness of human languages means we don't need to ask,
for example, "how tall is the object currently referred to by the name
Fred?", but in Python, it helps to understand that this is what's going on.
Regards,
John
.
- Follow-Ups:
- Re: why cannot assign to function call
- From: Aaron Brady
- Re: why cannot assign to function call
- References:
- Re: why cannot assign to function call
- From: Miles
- Re: why cannot assign to function call
- From: Aaron Brady
- Re: why cannot assign to function call
- Prev by Date: Re: Python module import loop issue
- Next by Date: Re: multiprocessing vs thread performance
- Previous by thread: Re: why cannot assign to function call
- Next by thread: Re: why cannot assign to function call
- Index(es):
Relevant Pages
|
Loading