On Monday, September 4, 2017 at 7:50:22 AM UTC+5:30, Chris Angelico wrote: > On Mon, Sep 4, 2017 at 12:05 PM, Steve D'Aprano wrote: > > On Mon, 4 Sep 2017 04:15 am, Stephan Houben wrote: > > > >> Needless to say, according to the definition in Plotkin's paper, Python > >> is "call-by-value". > > > > According to Plotkin's definition, when you pass a value like a 100MB > > string: > > > > "This is a long string of text..." # continues on for millions more > > characters > > > > does the interpreter make a copy of the 100MB string? > > > > If not, then it isn't pass (call) by value. > > This is another proof that you can't divide everything into "pass by > value" vs "pass by reference", unless you mess around with "passing a > reference by value" or other shenanigans. In C, a string is not an > entity; it's simply an array of characters. Arrays are never passed by > value; yet everything in C is passed by value. So you pass a > pointer... by value. > > What would you define LISP's semantics as? Pass by value? Pass by > reference? Pass by name? Pass by immutability? Pass the salt?
“Pass the logic" “Oops…” “You slob! You’ve messed my consistency-carpet." Earlier Ben Bacarisse wrote: > The core of the idea is actually what the value-set of Python programs is -- Yes! That!! Parameter-passing models and nomenclature is really a red-herring Its the “== is id” mess that is at the base of the mess: Simply put: pythonistas have no coherent/consistent sense of what python values are. And the endless parameter-passing-nomenclature arguments are just the fallout of that. Maybe that’s what Ben means by?? > the passing by value just drops out of that. -- https://mail.python.org/mailman/listinfo/python-list