
Binary
methods in
CLOS
Didier Verna
Introduction
Problem: C++
C++ attempts
Explanation
Solution: CL
CL OS solution
Method comb.
Usage
Introspection
Binary function class
Implementation
Misimplementations
Strong bin. functions
Conclusion
The CLOS Meta-Object Protocol
aka the CLOS MOP
CLOS itself is object-oriented
The CLOS MOP: a de facto implementation standard
The CLOS components (classes etc.) are
(meta-)objects of some (meta-)classes
Generic functions are meta-objects of the
standard-generic-function meta-class
⇒ We can subclass standard-generic-function
The binary-function meta-class
( defclass b i nar y − fun c tio n ( st an da rd − g en er ic − f unction )
( )
( : metac lass f un cal la ble − s tan dar d− cla ss ) )
( defmacro d e f bin a r y ( function−name la mb da − l ist &res t o pti o ns )
‘ ( defgeneric , function− name , lam bd a− li st
( : ge ne ric − f uncti on − clas s b ina r y − fu n cti o n )
, @options ) )
21/29