coding style - where to declare variables
rosuav at gmail.com
Mon Jul 23 08:02:48 EDT 2018
On Mon, Jul 23, 2018 at 9:39 PM, Steven D'Aprano
<steve+comp.lang.python at pearwood.info> wrote:
>  The CPython interpreter uses pointers; the Jython interpreter uses
> whatever kind of memory indirection the JVM provides; when I emulate a
> Python interpreter using pencil and paper, there's not a pointer in sight
> but a lot of copying of values and crossing them out. ("Copy on access"
> perhaps?) A Python interpreter emulated by a Turing machine would use
> dots on a long paper tape, and an analog computer emulating Python would
> use I-have-no-idea. Clockwork? Hydraulics?
I've been known to implement a linked list using a deck of cards, with
tetrapod "one teaspoon of sugar" packets for the Next markers, and
pens for externally-accessible references (the head of the list, the
current node, etc). This therefore proves that a pointer IS a teaspoon
of sugar, and vice versa.
Would you like your tea with one pointer or two?
More information about the Python-list