|
|
|
|
|
by lispm
3084 days ago
|
|
Even in CCL it depends on the compiler settings: ? (declaim (optimize (safety 3)))
NIL
? (defun foo (a) (declare (type (integer 0 100) a)) (+ a 10))
FOO
? (foo "bar")
> Error: The value "bar" is not of the expected type (MOD 101).
> While executing: FOO, in process listener(1).
> Type :POP to abort, :R for a list of available restarts.
> Type :? for other options.
1 >
Type declaration added -> runtime safety increased...Best read the implementation manual to see how it deals with optimization values and type declarations. |
|