4 ms·
Common Lisp has more than one type. See the standard: http://www.lispworks.com/documentation/HyperSpec/Body/04_bc.htm http://www.lispworks.com/documentation/Hyp
by lispm 4y ago
Common Lisp has more than one type. See the standard: http://www.lispworks.com/documentation/HyperSpec/Body/04_bc.htm http://www.lispworks.com/documentation/HyperSpec/Body/04_bc....
This exists since early 80s. The first language definition book appeared 1984: Common Lisp the Language.
One could think that it is a gradual type system. Type declarations are optional and are used for several purposes. Many implementations use type declaration and optionally type inference as input for optimizing compilers. In the 80s the first implementation to add limited forms of static type inferencing and checking was CMUCL. SBCL is a later fork of CMUCL.
The challenge is to integrate dynamic types, static types into a language which is often used interactively - including a lot of dynamic features, where programs can change at runtime or parts of the language might change during runtime. Thus the type system has its problems and hasn't been improved since the 90s... Not many implementations have adopted the type system implementation of CMUCL & SBCL.
Generally the SBCL compiler, even though it is based on 80s technology, is quite helpful when developing Lisp code.