, , , . ( , , , , , ?)
Lisp , , ( , ), -, , , .
, , CL- Racket. , CL: CL , Racket Racket/Scheme.
, - , (+ a b), a b , cl:+ , - .
, CL - :
(defpackage :org.tfeb.symalg
(:use)
(:export "+" "-" "*" "/"))
(let ((p (find-package :org.tfeb.symalg)))
(do-external-symbols (s (find-package :cl))
(ecase (nth-value 1 (find-symbol (symbol-name s) p))
((nil)
(import s p)
(export s p))
((:external)
nil)
((:inherited :internal)
(error "package botch")))))
(defpackage :org.tfeb.symalg-user
(:use :org.tfeb.symalg))
(, , , , : , - "", , , , .)
org.tfeb.symalg, cl, , , org.tfeb.symalg-user, cl. (+ 1 2) (org.tfeb.symalg:+ 1 2), (car '(1 . 2)) (cl:car '(1 . 2)).
(defmethod foo (a)
(:method-combination +))
(defmethod foo (a)
(:method-combination org.tfeb.symalg:+))
: + , cl:+. ( : org.tfeb.symalg:+, , , , .)
" " , (), .
Racket: Racket, ( ) ):
(provide
(rename-out
(plus +)
(minus -)
(times *)
(divide /)))
(define (plus . args)
(apply + args))
...
(define plus-symbol '+)
, , + plus .. - . , , (eq? '+ plus-symbol), #t: , +, .
: Racket CLOS (, , , ), + , , , .
, , CL, , - . CL Racket, .
CL :
: , + org.tfeb.symalg:+, , +, org.tfeb.symalg:+, ( ), , .
Racket: , , + +. +, . , , + Racket, , , , - , . + , , .
, Scheme , -, CL " gensyms, ", Lisp -1s, , , .