emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

EIEIO default constructor function


From: Mario Lang
Subject: EIEIO default constructor function
Date: Sat, 03 Apr 2021 05:50:42 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1.50 (gnu/linux)

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,
  ⡍⠁⠗⠊⠕



reply via email to

[Prev in Thread] Current Thread [Next in Thread]