lisp - Import from cl-user package -



lisp - Import from cl-user package -

is thought import cl-user package? far know, contents of bundle not specified standard, import of functions cl-user bundle break compatibility of program? illustration utilize gnu clisp , want utilize xor , ! functions in program, i've imported them cl-user package, how know other implementations include these functions well? there conventions or something?

on clisp, both xor , ! externals of ext package, not cl-user. not standard functions, cannot rely on existence when writing portable code.

you write along these lines utilize built-in functions on clisp , homebrewn ones on other lisps:

(in-package :my-package) #+clisp (import 'ext:xor) #-clisp (defun xor (&rest what) ;; own xor implementation ...) #+clisp (import 'ext:!) #-clisp (defun ! (&rest what) ;; own ! implementation ...)

lisp package common-lisp conventions

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -