Hacker News new | ask | show | jobs
by rayiner 2809 days ago
(I feel sheepish even saying this to you), but when people say "type inferencing" I think these days they tend to mean "inference of static types that are enforced at compile time within a rich static type system." SBCL infers static types within a (mostly) dynamic, permissive type system. It can enforce certain constraints at compile time, but it’s ad hoc (there is no well-defined model of what properties it can prove at compile time on any valid code).
2 comments

Type inferencing has a long tradition inside the Lisp community - for a language which is not statically typed, but which might be able to use type hints and static type information about the base language. Many Lisp compilers use type inference for optimization purposes.
Is there an alternative term which has arisen for what Lisp traditionally calls "type inference"?
SBCL calls it type propagation, which is fairly descriptive. (At least in SBCL, it's implemented as a data flow analysis that propagates constraints on the types of lexical variables: https://www.pvk.ca/Blog/2013/11/22/the-weaknesses-of-sbcls-t...).