In article <[email protected]>, Dennis Lee Bieber <[email protected]> wrote:
> On Fri, 04 Apr 2014 10:00:25 -0400, [email protected] 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". Problem? I always assumed it was a feature :-) -- https://mail.python.org/mailman/listinfo/python-list
