I'm wrong or Will we fix the ducks limp?

BartC bc at freeuk.com
Thu Jun 9 06:48:33 EDT 2016


On 09/06/2016 10:55, Antoon Pardon wrote:
> Op 09-06-16 om 11:10 schreef BartC:
>> On 09/06/2016 08:50, Antoon Pardon wrote:
>>> Op 08-06-16 om 19:29 schreef BartC:
>>>> I don't see why we should determine what a /proper/ reference
>>>>> can do, based on what it does in one specific language.
>>>>
>>>> Because there are some things that such references can do that Python
>>>> can't do with its object reference model, not without some difficulty
>>>> or having to write convoluted code.
>>>
>>> So? Maybe you have the wrong idea of what a reference is/can do?
>>
>> Maybe. Maybe in all the languages I've been implementing for three
>> decades have implemented references and pointers wrongly.
>
> Then I assume you haven't heard of smalltalk.
>
>> Well, all my implementations of references and pointers meet Steven
>> D'Apranso' swap() challenge (see his post in this thread about 90
>> minutes before this one).
>
> Yes and that seems to confuses assignments with mutations.
> The swap challenge is based on the assumptions that assignment
> mutates.
>
> You and Steven are expecting particular behaviour from the assignment
> that is acutually depending on behaviour that mutates. So if the assignment
> doesn't mutate, you can't expect that behaviour from an assignment.
>

What does it matter?

If swap() can be implemented via such a function, then it means that the 
language has such capability, which can be useful in different scenarios.

If it can't, then the language hasn't.

Python doesn't have it so it can't implement swap like that.

There's no need to bring references into it at all.

(A good thing as I've lost track of what it is you are arguing about! 
Are you staying references exist or they don't, that Python has them or 
it hasn't, or what?

Meanwhile those of us of who sometimes have to implement these things 
can just get on with it.)

-- 
Bartc


More information about the Python-list mailing list