;; hoge
(defpackage hoge
(:use :cl)
(:export :<hoge>))
(in-package :hoge)
(defclass <hoge> () ())
(defmethod call ((this <hoge>)))
;; fuga
(defpackage fuga
(:use :cl)
(:export :<fuga>))
(in-package :fuga)
(defclass <fuga> () ())
(defmethod call ((this <fuga>)))
;; main
(defpackage main
(:use :cl
:hoge
:fuga
:clack.util.ducktype))
(in-package :main)
(enable-duck-reader)
(&call (make-instance '<hoge>))
(&call (make-instance '<fuga>))
(disable-duck-reader) Clack.Util.Ducktype provides a way to call different objects which have a same name method, like duck-typing. These objects are no need to inherit each other.
This reader macro seems useful for Clack development, but, isn't used in Core now.
Detect correct function for `obj'. The function should be interned a package which exports a class of `obj'.
Call `duck-function' of the `obj'. I supposed `enable-duck-reader' may help you.
Apply `duck-function' of the `obj'. I supposed `enable-duck-reader' may help you.
Enable duck-typing-reader. Example: (&call app env)
Disable duck-typing-reader if it is enabled.