HackSpace_-_April_2020

(Frankie) #1

Letters


REGULAR


Letters
ATTENTION
ALL MAKERS!
If you have something you’d
like to get off your chest (or
even throw a word of praise
in our direction) let us know at
hsmag.cc/hello

A BIT SLIPPERY
As always, I am loving my current issue of HackSpace
magazine. But I ran across a minor issue that might
confuse readers. It could, at least, use a little deeper
explanation from the author.
On page 23 in 'Python on hardware', Drew Fustini says
that Python is an interpreted language and is not
compiled. But Python IS compiled. It compiles just
before it runs. It compiles into binary bytecodes that
execute in a simulated processor (very much like Java).
This is true even for MicroPython.
The author probably meant that Python doesn't
compile into 'native' binary that runs directly on
the processor.
Why is the distinction important? This binary
compiled bytecode is much, much faster than a pure
interpreter would be. And the binary compiled-code is
kept on the device for the next execution (the compiler
only runs once).
Thanks again for your magazine!

Christopher

Ben says: Is Python compiled or interpreted? In
truth, it doesn't really fit into either category very
well. From the user's perspective, it runs
exactly as you would expect an interpreted
language to work. You change the code, then it's
one step to run it. From the computer's
perspective, it runs more like a compiled
language – the computer doesn't care that the
compiler and virtual machine are controlled by the
same command or action. We call Python interpreted
because that's how it appears to the user, but if you
progress with the language, it's useful to remember that
this is really a little white lie.

Below
Python seems to
be everywhere
these days
Free download pdf