You mean something like a byte code like language with a JIT system? Like Java and C#? C# in particular now supports AOT compilation, but can still be run as “interpreted” CIL.
The VM abstraction is not a barrier to fully optimizing for your architecture, but rather how much time you can spend converting IR/bytecode into assembly, whether you do it at runtime, and whether runtime information lets you optimize even further.
This has been a great feature of many lisps for 4+ decades now. Not unique to them of course.
By the way, there are some (high-level) compiled languages with REPLs like Lisp, Haskell and Elixir.
Does elixirc compile to "native code" ?
Does the Haskell REPL use an interpreter not the GHC compiler?
http://downloads.haskell.org/~ghc/latest/docs/html/users_gui...
This is exactly as it should be: the nature of the interpreter is that it has to do a lot of the work a compiler does when it compiles whenever a new command is run (and in Python's case, that is before you cover the whole "everything is an object" part). Yes, some of it can be mitigated, but the expectation that an interpreter keep pace with compiled code is somewhat of a pipe dream. What I'd love is a language that can be compiled (and be highly optimized) and interpreted without changing it's behavior. The developer experience with an interpreter is fantastic, the performance of compiled code is... better.