[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Manual errors in (eieio) regarding single inheritance/dispatch?
From: |
hokomo |
Subject: |
Manual errors in (eieio) regarding single inheritance/dispatch? |
Date: |
Sun, 18 Sep 2022 19:40:05 +0200 |
User-agent: |
mu4e 1.8.9; emacs 28.1.91 |
Hello,
(eieio) Introduction says (emphasis mine):
"1. A structured framework for the creation of basic classes with
attributes and methods using *singular inheritance* similar to
CLOS."
"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."
(eieio) Generics also mentions (emphasis mine):
"In CLOS, a generic call also be used to provide an argument list
and
dispatch precedence for all the arguments. *In EIEIO, dispatching
only
occurs for the first argument*, so the ARGLIST is not used."
But aren't these in contradiction with `defclass', which allows
multiple superclasses, and `cl-defgeneric' and `cl-defmethod',
which allow specializing/dispatching on multiple arguments?
I've noticed that `cl-defgeneric' and `cl-defmethod' are not the
same as `defgeneric' and `defmethod', but both (eieio) Generics
and (eieio) Methods use the former, not the latter. Perhaps the
manual should be updated now that the former are the standard way
of doing things?
hokomo
- Manual errors in (eieio) regarding single inheritance/dispatch?,
hokomo <=