首页信息安全在CommonLisp中,符号名称是否有定义的最大长度?

在CommonLisp中,符号名称是否有定义的最大长度?

admin 05-29 07:00 277次浏览

我在Hyperspec或Common Lisp:The Language(第二版)中找不到此信息。与实现相关的常量,例如LAMBDA-PARAMETERS-LIMITCALL-ARGUMENT-LIMIT,但不是SYMBOL-NAME-LENGTH-LIMITPRINTABLE-SYMBOL-NAME-MAX-LENGTH

名称最长的标准符号为UPDATE-INSTANCE-FOR-DIFFERENT-CLASSUPDATE-INSTANCE-FOR-REDEFINED-CLASS,均为35个字符长,因此我想最多可以使用35个字符。我不希望再为符号命名更长的名称,但这可能有一天会很重要。

1> rsm..:

In Common Lisp the names of symbols are strings, strings are vectors (one-dimensional arrays) and thus the length of strings is limited by array-dimension-limit.

According to CL HyperSpec http://www.lispworks /documentation/HyperSpec/Body/v_ar_dim.htm#array-dimension-limit array-dimension-limit is:

A positive fixnum, the exact magnitude of which is implementation-dependent, but which is not less than 1024.

Practically, SBCL reports

* array-dimension-limit
4611686018427387901

so it's not really a limit

.
旁注:CLtL2并不是真正的规格。在指定为ANSI Common Lisp之前,这是Common Lisp版本的语言描述。因此,实际的ANSI CL规格有所不同。HyperSpec的内容与HTML内容基本相同的HTML呈现为:http://www.lispworks /documentation/HyperSpec/Front/Contents.htm
@RainerJoswig哦,我不知道,谢谢!我将CLtL2部分更改为HyperSpec。
在CommonLisp中符号名称是否有定义的最大长度?
IntelliJ Plugin 开发之添加第三方jar的示例代码 java生成图片验证码的示例代码
相关内容