3 ms·
>Type declarations in Common Lisp are unsafe. Violating a declaration at runtime is UB. What SBCL is doing to Common Lisp is similar to what C compiler vendors
by flavio81 8y ago
>Type declarations in Common Lisp are unsafe. Violating a declaration at runtime is UB.
What SBCL is doing to Common Lisp is similar to what C compiler vendors did to C. In order to win at benchmarks, C compiler vendors started to use UB as a license to miscompile optimized code, which got them better benchmarks.
Fear, uncertainty and doubt.
Type declarations are part of the ANSI Common Lisp standard.
Lisp implementations can decide what to do with type mismatches (thus the UB), but how can this be a problem? Code will still be standards-compliant.