Re:Coalton: How to Have Our (Typed) Cake and (Safely) Eat It...
by reikonomusha on Friday September 10, 2021 @04:31PM
(#28486543)
Everything in Coalton is statically typed. The boundary happens at the "COALTON:LISP" operator, which lets the programmer drop into dynamically typed Common Lisp to perform a computation. (This is how a lot of the standard library is implemented.) If you decide to drop into Lisp with the COALTON:LISP operator, then it's on you to supply a correct type annotation for that Lisp code. (This type will be checked at run-time.) So there's certainly room for human mistakes with types.
However, if you're really scared, you can do
(declaim (optimize (speed 0) (safety 3)))
and really precise run-time type assertions will be inserted into the code.
However, if you're really scared, you can do
and really precise run-time type assertions will be inserted into the code.