Abstractions [was Re: Pass variable by reference]
Steven D'Aprano
steve+comp.lang.python at pearwood.info
Fri May 9 20:58:58 EDT 2014
On Fri, 09 May 2014 17:30:10 -0500, Mark H Harris wrote:
> On 5/7/14 8:31 PM, Chris Angelico wrote:
>> On Thu, May 8, 2014 at 4:11 AM, Mark H Harris <harrismh777 at gmail.com>
>> wrote:
>>> And we must never forget that CPython's underpinnings, uhm C, uses
>>> variables, C ones... (never mind)
>>
>> Be careful of this one. It's utterly irrelevant to your point, and may
>> be distracting. I could implement Ook in Python; does that mean that
>> Ook has a socket library? Clearly not.
>
> Probably. Although, its turtles all the way down. C is a better way
> to write asm code (more efficient, less lines of code, better
> abstraction, way more readable). wow, use C to build Python. Python is
> requires way less lines of code than C, better abstraction, more
> efficient, and way more readable. Now, down under the stack of turtles,
> we are still placing values into memory boxes (variables) although we
> are getting there from a very abstract and indirect way; but its turtles
> all the way down from a certain point of view.
I think you have missed the point that "turtles all the way down" means
an *infinite* chain of abstractions, not a finite one. But when running
code, eventually you reach hardware, and the chain of abstractions ends.
No more turtles.
Suppose I run some code in a BASIC interpreter written in Prolog, which I
run in an emulator written in Python, running on PyPy. Then we have the
following levels of explanation of what's going on, from the most high
level to the lowest level:
BASIC
Prolog
Python
RPython
C
Machine code
Micro code
and we reach the actual hardware layer and the abstractions are over.
(If you want to nit-pic about whether micro code is an abstraction,
that's fine, you can add a layer or two if you wish. But we're not far
from *actual electric currents in an actual physical device*, at which
point we're now talking about a concrete, physical description of the
process, not an abstraction. There really is a bottom-most turtle that
holds up all the rest.)
--
Steven D'Aprano
http://import-that.dreamwidth.org/
More information about the Python-list
mailing list