5 ms·
How do you handle the boundary between typed and untyped? My experience is that this is where things fail, because most code you'll want to leverage will be unt
by didibus 5y ago
How do you handle the boundary between typed and untyped? My experience is that this is where things fail, because most code you'll want to leverage will be untyped.
- reikonomusha 5y agoEverything 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.