Re:On Learning Rust and Go: Migrating Away from Python
by codetrotter on Sunday March 24, 2019 @07:08AM
(#19475656)
I largely agree with what you said but
> there's nothing lingual about python that stops it from being compiled
Are you sure? Python is a very dynamic language. Some of the most dynamic parts of python might not be possible to compile fully ahead of time and might need to be JITed, because the behavior of the code will only be possible to determine at runtime.
Re:On Learning Rust and Go: Migrating Away from Python
by darkr on Sunday March 24, 2019 @08:42AM
(#19476004)
CPython doesn't have a JIT. It compiles to bytecode, which is then "interpreted" by a stack based VM.
Re:On Learning Rust and Go: Migrating Away from Python
by pushpop on Sunday March 24, 2019 @06:42AM
(#19475570)
They have a historic point but you’re right that their description doesn’t make much sense given the modern way language runtimes are designed.
A better description would be “high level JIT compiled language”.
> After all python is still an interpreted scripting language.
Is it? Or rather, is this even a well-defined category?
> interpreted
Can't any (OK, almost any) language be either interpreted or compiled? The fact that python is typically run in an interpretive runtime setting doesn't really make it "interpreted" as a language. In fact, since python is nearly always compiled to byte code at runtime, it's arguable just as compiled as it is interpreted.
But that's not even the point: there's nothing lingual about python that stops it from being compiled. It can be compared with other languages that are typical run subsequent to a compilation step without being the apple to an orange.
> scripting
This one speaks to me even less. For python to properly be understood as a "scripting" language, I think you'd have to convince me that the lion's share of community energy is dedicated to a paradigm of running a single module front-to-back as a script.
And this is clearly not so.