operator #+ and #- in .sbclrc

后端 未结 2 2000
再見小時候
再見小時候 2020-12-11 16:51

Anybody know what #+ and #- operators means in .sbclrc? I couldn\'t find it in the manual. I see #- in .sbclrc

2条回答
  •  醉梦人生
    2020-12-11 17:20

    That's a general facility of Common Lisp, not only SBCL.

    There is a variable cl:*features* which lists symbols for 'features' which should be present in the Lisp system currently. Typical features are: endian, implementation, subsystems, processor, extensions, Lisp dialect and more.

    In a Lisp file the expression #+quicklisp(foo) means: read and execute (foo) only if the feature quicklisp is present in the list of features *features*.

    In a Lisp file the expression #-quicklisp(foo) means: read and execute (foo) only if the feature quicklisp is NOT present in the list of features *features*.

    This facility is often used to hide or show implementation specific code to some other Common Lisp implementation.

    See the documentation:

    • Features
    • Feature Expressions
    • sharpsign plus
    • sharpsign minus

    A typical extension is the feature-case reader macro.

提交回复
热议问题