osdir.com


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Call by binding [was Re: [Tutor] beginning to code]


On Mon, Sep 25, 2017 at 7:41 PM, Marko Rauhamaa <marko at pacujo.net> wrote:
> Antoon Pardon <antoon.pardon at vub.be>:
>
>> the semantics of an assignment depends on the language
>
> I've only seen one kind of assignment in the general-purpose programming
> languages I know, maybe with the exception of Prolog and Rust.
>
> So the assignment is the same everywhere, only the evaluation model
> varies. In classic C, expressions evaluate to integers, double-precision
> floating-point numbers or pointers. In Python, all expressions evaluate
> pointers.

And that's an assertion that isn't backed by anything in the Python
specification. Where do you get that all Python expressions are
pointers? That's a construct invented specifically to shoe-horn Python
into "hey look it's pass by value". It's not the fundamental of the
language.

ChrisA