1.5 Compilation Versus Interpretation

PSL uses both compiled and interpreted code. If compiled, a function usually executes faster and is smaller. However, there are some semantic differences of which the user should be aware. For example, some recursive functions are made non-recursive, and certain functions are open-compiled. A call to an open-compiled function is replaced, on compilation, by a series of online instructions instead of just being a reference to another function. Functions compiled open may not do as much type checking.

1 lisp> (de list-first (p) (car p))  
2 lisp> (list-first "STR")  
⋆⋆⋆⋆⋆ An attempt was made to do CAR on ‘"STR', which is not a pair  
3 lisp> (compile '(list-first))  
4 lisp> (list-first "STR")  
#<Unknown f7000002>

To avoid this the user would have to add code which checks the type of P before car is applied.