3 ms·
SBCL has a very sane type inference engine that it uses to detect type mismatches and for optimization. This, along with type and ftype declarations, is enough
by phoe-krk 8y ago
SBCL has a very sane type inference engine that it uses to detect type mismatches and for optimization. This, along with type and ftype declarations, is enough to write statically typed code in Lisp with compile-time warnings.
- YouAreGreat 8y ago> enough to write statically typed code in Lisp Certainly not in the way "statically typed" is usually understood. Containers (outside of specialized arrays) aren't parameterized, so every time you extract a value from a list or map, the "static type" is the top type. SBCL remains essentially unityped with islands of type propagation for better performance of (mostly) numeric code.
- phoe-krk 8y agoLists aren't typed in standard Common Lisp. For these cases, using THE around the access site is required to declare the type for inference.