|
|
|
|
|
by rahimiali
1526 days ago
|
|
> "What you really want is a compiler, isn’t it?" The thing is, Python is just as compiled as, say Java. Python converts your code to byte code, then executes that bytecode in its VM. These are the same steps Java takes. So this "whoops" doesn't work for me: "Some language that’s as easy to use as Python and it should be compiled and with good static typing, but it should also not be compiled because then it wouldn’t be as easy to use as Python anymore. Whoops?". The reason the typing in Python is lax was entirely a choice. Maybe not a good choice, but it certainly has nothing to do with "compiled" vs "interpreted". |
|
Rather, you have to look at it like an attribute based categorization:
Compiled:
- types known at compile time
- limited runtime features like stack traces, introspection
- working closer to primitive data types
Interpreted:
- dynamic, with lots of indirection
- wrapped data types (eg PyObject) vs primitives
- rich runtime with stack traces, introspection, monkey patching