all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* EIEIO default constructor function
@ 2021-04-03  3:50 Mario Lang
  2021-04-03 13:48 ` Stefan Monnier
  0 siblings, 1 reply; 8+ messages in thread
From: Mario Lang @ 2021-04-03  3:50 UTC (permalink / raw)
  To: emacs-devel

Hi.

While porting a CLOS based project over to Elisp, I notice that there
seems to be no way to disable the creation of a default constructor
function with `defclass'.  I am getting a redefinition warning because I
am defining my own "constructor" with the same name.  This is all just
naming-fu, i.e., I know I could just rename the class to avoid the
conflict.  But I am wondering: `make-instance' is a nice way of avoiding
namespace pollution if several classes are involved.  In other words,
avoiding the creation of yet another function might be desireable in
some situations.

So my question is, what is the rationale behind *always* creating a
wrapper for `make-instance'?  Am I missing something important?
Could we perhaps add some sort of class-option to disable the wrapper
creation?

-- 
CYa,
  ⡍⠁⠗⠊⠕



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

end of thread, other threads:[~2021-04-08  4:44 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-04-03  3:50 EIEIO default constructor function Mario Lang
2021-04-03 13:48 ` Stefan Monnier
2021-04-04  2:42   ` Mario Lang
2021-04-04  3:10     ` Stefan Monnier
2021-04-04  8:39       ` Mario Lang
2021-04-04 14:12         ` Stefan Monnier
2021-04-08  3:37           ` Mario Lang
2021-04-08  4:44             ` 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.