tex*_*aft 6 symbols common-lisp identifier language-lawyer
我在Hyperspec或Common Lisp:The Language(第二版)中找不到此信息。与实现相关的常量,例如LAMBDA-PARAMETERS-LIMIT和CALL-ARGUMENT-LIMIT,但不是SYMBOL-NAME-LENGTH-LIMIT或PRINTABLE-SYMBOL-NAME-MAX-LENGTH。
名称最长的标准符号为UPDATE-INSTANCE-FOR-DIFFERENT-CLASS和UPDATE-INSTANCE-FOR-REDEFINED-CLASS,均为35个字符长,因此我想最多可以使用35个字符。我不希望再为符号命名更长的名称,但这可能有一天会很重要。
rsm*_*rsm 12
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.com/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
Run Code Online (Sandbox Code Playgroud)
so it's not really a limit.