Steven D'Aprano <steve+comp.lang.pyt...@pearwood.info>: > On Wednesday 20 May 2015 19:56, Bartc wrote: >> But simple data such as small integers and floats are passed by >> value. Bigger data is 'sort of' passed by reference, but not full >> reference (the details are a bit messy, but if an object consists of >> two parts (A,B), then a copy of descriptor A is passed, which >> contains a pointer to B. For small scalars, the B part doesn't >> exist). > > Sounds complicated and confusing. In my opinion, you would be better > off picking a well-known argument passing convention (call by value, > reference, name, sharing) and using that, always.
I wonder if BartC refers to the conceptual model or implementation. Elisp uses the waste bits of pointers as flags; (small) integers are represented as fake (illegal) pointers. However, the implementation choice is in no way visible at the Lisp level. Marko -- https://mail.python.org/mailman/listinfo/python-list