定义方法时它有多重要print-object?
例如,在我看来,hash-tableSBCL 中的实例就违反了这一原则。
对于像这样的功能:
(defun test (x y)
(declare (optimize (speed 3)))
(< x y))
Run Code Online (Sandbox Code Playgroud)
我看到一个警告,其中包含:
note:
unable to
open-code FLOAT to RATIONAL comparison
due to type uncertainty:
The first argument is a REAL, not a FLOAT.
The second argument is a REAL, not a RATIONAL.
Run Code Online (Sandbox Code Playgroud)
如果我知道要么两个参数都是RATIONAL xor FLOAT,那么是否有一个声明提示我可以给sbcl这个?