Previous: Methods, Up: Writing Methods

6.3 Static Methods

Static methods do not depend on an object instance, but instead operate on a class. You can create a static method by using the :static key with defmethod.

The first argument of a :static method will be a class rather than an object. Use the functions oref-default or oset-default which will work on a class.

A class's make-instance method is defined as a :static method.

Note: The :static keyword is unique to EIEIO.