Dennis Lee Bieber <wlfr...@ix.netcom.com> Wrote in message:
> On Fri, 04 Apr 2014 10:00:25 -0400, random...@fastmail.us declaimed the
> following:
> 
>>
>>I can't imagine a language that would work that way. For one, it would
>>also imply that passing a value would change the default for future
>>calls even for non-mutable types.
> 
>       Some early FORTRAN compilers purportedly had problems with, for
> example:
> 
>       X = 1
>       call mutant(1)
>       Y = 1
>       
> where
> 
>       subroutine mutant(y)
> 
>       y = y + 1
>       return
> 
> meant that Y now held the value of 2 -- that is, literals were stored in
> mutable memory, and since FORTRAN passes by reference, the address of the
> literal is passed, and the assignment changed the "constant".

I can confirm that,  first hand.

In late 60's, CDC 6400, I deliberately wrote code to exploit that.
  Not for production of course.


-- 
DaveA

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

Reply via email to