Steve D'Aprano <steve+pyt...@pearwood.info> writes: > On Fri, 8 Sep 2017 12:28 am, Chris Angelico wrote: > >> languages without mutable objects don't >> really care whether they're pass-by-X or pass-by-Y. > > Only if you don't care about efficiency. > > Believe me, the first time you pass a five gigabyte array to a function using > pass-by-value, on a machine with only six gigabytes of memory, you'll care.
I think your general idea to separate language semantics from implementation details is a good one, but you've dropped it here. A language with call-by-value semantics need not copy large objects when passing them to a function. The program must behave *as if* there is a copy but there need not actually be one. <snip> -- Ben. -- https://mail.python.org/mailman/listinfo/python-list