如果我正确理解 Common Lisp 标准的第 15.1.2.1 节(upgraded-array-element-type '(unsigned-byte 8))
,那么to be'(unsigned-byte 16)
甚至t
. 因此,我的问题是关于实现的实际行为。
今天是否有任何正在使用'(unsigned-byte 8)
或'(unsigned-byte 16)
升级的实现?换句话说,以下是错误的:
(and (subtypep (upgraded-array-element-type '(unsigned-byte 8)) '(unsigned-byte 8))
(subtypep (upgraded-array-element-type '(unsigned-byte 16)) '(unsigned-byte 16))
(该表达式适用于 SBCL、CLISP、Allegro CL、Clozure CL 和 LispWorks。)