|
|
|
|
|
by dreamcompiler
3084 days ago
|
|
You're right. The standard leaves the interpretation of type declarations in CL up to the implementation. I was coming from a CCL perspective, and I should have checked the others. In CCL: ? (defun foo (a) (declare (type (integer 0 100) a)) (+ a 10))
FOO
? (foo -1)
9
It's dangerous to assume the effect type declarations will have in CL. You have to test it. |
|
Best read the implementation manual to see how it deals with optimization values and type declarations.