all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Manual errors in (eieio) regarding single inheritance/dispatch?
@ 2022-09-18 17:40 hokomo
  2022-09-19 11:40 ` Stefan Monnier
  0 siblings, 1 reply; 2+ messages in thread
From: hokomo @ 2022-09-18 17:40 UTC (permalink / raw)
  To: emacs-devel

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



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Manual errors in (eieio) regarding single inheritance/dispatch?
  2022-09-18 17:40 Manual errors in (eieio) regarding single inheritance/dispatch? hokomo
@ 2022-09-19 11:40 ` Stefan Monnier
  0 siblings, 0 replies; 2+ messages in thread
From: Stefan Monnier @ 2022-09-19 11:40 UTC (permalink / raw)
  To: hokomo; +Cc: emacs-devel

hokomo [2022-09-18 19:40:05] wrote:
> 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?

Indeed, thank you.  I've removed these outdated limits.


        Stefan




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-09-19 11:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-18 17:40 Manual errors in (eieio) regarding single inheritance/dispatch? hokomo
2022-09-19 11:40 ` Stefan Monnier

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.