Next: , Previous: Naming Conventions, Up: Top

18 CLOS compatibility

Currently, the following functions should behave almost as expected from CLOS.

All slot keywords are available but not all work correctly. Slot keyword differences are:
:reader, and :writer tags
Create methods that signal errors instead of creating an unqualified method. You can still create new ones to do its business.
This should create an unqualified method to access a slot, but instead pre-builds a method that gets the slot's value.
Specifier uses the typep function from the cl package. See Type Predicates. It therefore has the same issues as that package. Extensions include the ability to provide object names.

defclass also supports class options, but does not currently use values of :metaclass, and :default-initargs.

Make instance works as expected, however it just uses the EIEIO instance creator automatically generated when a new class is created. See Making New Objects.
Creates the desired symbol, and accepts all of the expected arguments except :around.
Calls defgeneric, and accepts most of the expected arguments. Only the first argument to the created method may have a type specifier. To type cast against a class, the class must exist before defmethod is called. In addition, the :around tag is not supported.
Inside a method, calls the next available method up the inheritance tree for the given object. This is different than that found in CLOS because in EIEIO this function accepts replacement arguments. This permits subclasses to modify arguments as they are passed up the tree. If no arguments are given, the expected CLOS behavior is used.

CLOS supports the describe command, but EIEIO provides support for using the standard describe-function command on a constructor or generic function.

When creating a new class (see Building Classes) there are several new keywords supported by EIEIO.

In EIEIO tags are in lower case, not mixed case.