3 ms·
Type checking gets wonky in the REPL world, since things are changing a lot. During JIT usage (i.e. REPL usage or running a program right from source), type che
by Jeaye 4y ago
Type checking gets wonky in the REPL world, since things are changing a lot. During JIT usage (i.e. REPL usage or running a program right from source), type checking happens for each new form, taking into account what it knows of the types so far. In this context, some things, such as redefining vars, don't retroactively type check all previous usages of the var. So that sort of analysis is disabled.
During AOT compilation, though, jank does whole program analysis and uses the type information to box/unbox, monomorphize, compute at compile-time, etc. I'll be publishing documentation on each of these designs (the type system, the JIT, the interop support) on the website as things move forward. Stay tuned. :)