Hacker News new | ask | show | jobs
by stefano 5567 days ago
"Now I am fully aware that “the compiler can optimize this away”, at least in some cases, but to achieve this requires one of two things (apart from unreachable levels of ingenuity that can easily, and more profitably, be expressed by the programmer in the first place). Either you give up on modular development, and rely on whole program analysis (including all libraries, shared code, the works), or you introduce a static type system precisely for the purpose of recording inter-modular dependencies."

Or you can use a tracing jit. You monitor at runtime the actual values taken by the variables and produce type-specialized code.