anything like C++ references?

Stephen Horne intentionally at blank.co.uk
Mon Jul 14 22:48:20 EDT 2003


On Mon, 14 Jul 2003 18:04:40 -0700, Erik Max Francis <max at alcyone.com>
wrote:

>Roy Smith wrote:
>
>> The wierd thing is that I don't think either one really matches what a
>> mathematician means when he writes "=".  In math, "=" is neither an
>> assignment or a test: it's an assertion.
>
>Right.  In fact, when a mathematician really does mean rebinding, they
>use an operator decidely unlike =, often :=, <-, <=, or some other
>similar ASCIIzation.  The equals sign in mathematics does not mean the
>same thing it does in modern programming languages.  It's just something
>that one has to deal with early on or be forever annoyed.

The fact that Python has, in this respect, followed the C etc
tradition doesn't mean it is doing the right thing.

>It's arguable that the Pascal family has the most mathematics-like
>operations for equality and assignment here, but really it's just a
>semantic issue of knowing which operator means what.  One can even get
>used to things like % means string formatting if one really tries :-).

True enough. And if someone creates a language in which '+' does
subtraction, I'm sure people could get used to that to. Doesn't mean
it's the right thing, though.





More information about the Python-list mailing list