3 ms·
Nope, Common Lisp is strongly typed, however the implementations are a bit flexible in how they handle it - the minimum required is that they serve as asserts (
by p_l 3y ago
Nope, Common Lisp is strongly typed, however the implementations are a bit flexible in how they handle it - the minimum required is that they serve as asserts (essentially, types for safety).
CMUCL Python compiler (not to be confused with the much younger language of the same name), which is also used by CMUCL's descendants like SBCL, is famous for the amount of type-guided optimisation it performs. If it can subtype, or you can inform you of appropriately narrow type, it will happily replace more generic arithmetic and with (safety 0) elide all safety checks.
- pfdietz 3y agoAlso, the soft typing it does to allow the type-guided optimization also allows it to detect many type errors at compile time. These become warnings; it's considered proper to eliminate all such warnings from your code before considering it to "compile".