On Thursday, 21 May 2015 18:16:33 UTC+1, Steven D'Aprano wrote: > On Thu, 21 May 2015 11:34 pm, bartc wrote: > > On Thursday, 21 May 2015 06:19:39 UTC+1, Steven D'Aprano wrote:
> > Using what is really pass-by-reference for everything is fine, > > I'm really sure it isn't fine. You could use pass-by-reference for > everything, but if you do, you will surprise a lot of people: Yes, I using the term informally (as in, 'reference count'). I meant how CPython appears to pass data around (as Py_Object* types). > > If small integers need to be heap-allocated and managed, then it might > > need a few more. (And then Python will auto-range these to arbitrary > > precision as needed, another difference.) > > Are you talking about Python or your custom language? My language, and the problems there might be in adopting the CPython style of passing pointers around. (Another problem I've just realised is that everything in my language is mutable: I can even change the the bits of a small integer in-place. That will be interesting to solve.) (I came into this trying to investigate why CPython was so slow, I may end up wondering how it manages to be as fast as it is!) -- Bartc -- https://mail.python.org/mailman/listinfo/python-list