Why is it impossible to create a compiler than can compile Python to machinecode like C?

Chris Angelico rosuav at gmail.com
Thu Feb 28 16:10:37 EST 2013


On Fri, Mar 1, 2013 at 7:50 AM, Matty Sarro <msarro at gmail.com> wrote:
> C (your example) was intended for very low level programming, things like
> operating systems, device drivers, networking stacks, where the speed of a
> compiled executable and direct access to hardware was a necessity. That's
> what Dennis Ritchie wrote it for. We call it a "mid level" programming
> language, or a "low level" programming language depending on who you talk
> to. I'd have to say mid level because low level would be writing in assembly
> or playing with a hex editor :)

Assembly is for people who write C compilers.
C is for people who write language interpreters/compilers.
Everyone else uses a high level language.

Not 100% accurate but a reasonable rule of thumb.

ChrisA



More information about the Python-list mailing list