Due to restrictions in the Emacs Lisp language, CLOS cannot be
completely supported, and a few functions have been added in place of
EIEIO supports the following features:
- A structured framework for the creation of basic classes with attributes
and methods using singular inheritance similar to CLOS.
- Type checking, and slot unbinding.
- Method definitions similar to CLOS.
- Simple and complex class browsers.
- Edebug support for methods.
- Imenu updates.
- Byte compilation support of methods.
- Help system extensions for classes and methods.
- Several base classes for interesting tasks.
- Simple test suite.
- Public and private classifications for slots (extensions to CLOS)
- Customization support in a class (extension to CLOS)
Here are some important CLOS features that EIEIO presently lacks:
- Method dispatch
- EIEO does not support method dispatch for built-in types and multiple
arguments types. In other words, method dispatch only looks at the
first argument, and this one must be an EIEIO type.
- Support for metaclasses
- There is just one default metaclass,
and you cannot define your own. The
:metaclass tag in
defclass is ignored. Also, functions like `class-of' and
`find-class', which should return instances of the metaclass, behave
differently in EIEIO in that they return symbols or plain structures
- EQL specialization
- EIEIO does not support it.
:around method tag
- This CLOS method tag is non-functional.
- :default-initargs in
- Each slot has an
:initarg tag, so this is not really necessary.
- Mock object initializers
- Each class contains a mock object used for fast initialization of
instantiated objects. Using functions with side effects on object slot
values can potentially cause modifications in the mock object. EIEIO
should use a deep copy but currently does not.