typed_python
typed_python copied to clipboard
Should be able to control how the compiler responds to uncompilable code.
Right now, we attempt to compile everything. If we see something we don't understand in the compiler, we attempt to convert everything to 'object' and call the interpreter. This is preferable if you want everything to work, but it can make it difficult to detect when your code is slow because you are doing something typed_python doesn't know how to compile.
To alleviate this, we should add something to Runtime to let us decide how the compiler responds to things it can't compile, letting us choose between compiling it to the interpreter silently, compiling it but logging it as a warning, or refusing to compile it and throwing a compile-time error.