From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Zhu Zihao Newsgroups: gmane.emacs.devel Subject: Re: Slot accessing issues in EIEIO Date: Thu, 07 May 2020 22:52:00 +0800 Message-ID: <87zhajg5m7.wl-all_but_last@163.com> References: <87a72lhf3b.wl-all_but_last@163.com> <878si5gmt7.wl-all_but_last@163.com> <877dxoh1m6.wl-all_but_last@163.com> <874kssgzrf.wl-all_but_last@163.com> <87k11nzvc2.fsf@bernoul.li> Mime-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="101020"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM/1.14.9 (=?ISO-8859-4?Q?Goj=F2?=) APEL/10.8 EasyPG/1.0.0 Emacs/27.0 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) Cc: emacs-devel@gnu.org, Stefan Monnier , Zhu Zihao To: Jonas Bernoulli Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu May 07 16:53:29 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jWhtw-000Q9t-I3 for ged-emacs-devel@m.gmane-mx.org; Thu, 07 May 2020 16:53:28 +0200 Original-Received: from localhost ([::1]:55692 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jWhtv-0006Zt-KB for ged-emacs-devel@m.gmane-mx.org; Thu, 07 May 2020 10:53:27 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48976) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jWhtB-0004ja-Ft for emacs-devel@gnu.org; Thu, 07 May 2020 10:52:41 -0400 Original-Received: from m12-16.163.com ([220.181.12.16]:42479) by eggs.gnu.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jWht4-0005RE-DK for emacs-devel@gnu.org; Thu, 07 May 2020 10:52:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=Date:Message-ID:From:Subject:MIME-Version; bh=mug5p 6Nm9SxmICWxMo7JFs3sIuYvwCbnyjJsUuVX1PE=; b=OnNKRm5WfgXH0nlZoSi1j 7s2zX0XJ7IY2dICuea3sFrjWcPAweDGfR72Rk7eAGUEQeQaUz8+qWFJV98Hnf02+ d0lBlRl0+HRAf2G0fST7Nvk1Io4T4ipzdbvxKf1AuFghzvsZ5PZiMeJlV4dvLbDk fmv2sysXvmiRQr3KwJiSbM= Original-Received: from archlinux.163.com (unknown [113.102.100.98]) by smtp12 (Coremail) with SMTP id EMCowABnbiqYILRe4t9eCw--.276S2; Thu, 07 May 2020 22:52:12 +0800 (CST) In-Reply-To: <87k11nzvc2.fsf@bernoul.li> X-Face: :]]%@R1{oDt0%iKgI@Kga#OZ; ogt+%OOne&J4#E*O,TIlI)yEFw--I\:3s~EV97GI$1.1!}8inmF9UgtUBB@#8>'8NWNC8qg/v*OLfQB; Z:@G3HeNf3u& ,&HpBGv%?p{bzsl'|5T";1&X X-CM-TRANSID: EMCowABnbiqYILRe4t9eCw--.276S2 X-Coremail-Antispam: 1Uf129KBjvdXoW7XryDXFyxurWxAr45XrykGrg_yoWfWrb_Cr WrWan7Aw15AFs7Gw43Kr4YvFZxGr15ury8WasYgr9rtryqva1ftayDtrn7Cw1Iyw4UCF9I va4xZrnrurnxWjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUvcSsGvfC2KfnxnUUI43ZEXa7xR_XTmDUUUUU== X-Originating-IP: [113.102.100.98] X-CM-SenderInfo: pdoosuxxwbztlvw6il2tof0z/1tbiKRwdr1Xlv7vqNwAAsu Received-SPF: pass client-ip=220.181.12.16; envelope-from=all_but_last@163.com; helo=m12-16.163.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/07 10:52:23 X-ACL-Warn: Detected OS = Linux 3.1-3.10 [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:249182 Archived-At: On Thu, 07 May 2020 22:13:49 +0800, Jonas Bernoulli wrote: > That sounds too complicated for my use-cases at least, and I don't see > what we gain by doing that except not having to advice `eieio-oref' and > `eieio-oset', which by the way I don't think is all that horrible. Yes, any hack based on slot-missing or slot-unbound looks like a kind of anti-pattern. I've mentioned slot-value-using-class above, but this was based on the MOP(metaobject protocol) of CLOS. For EIEIO, a simple solution is make eieio-oref and (setf eieio-oref) a generic > I haven't gotten around to ask for the latter so far because as long as > `closql' supports older Emacs releases it would have to keep doing > something like the former for their benefit anyway. I think Emacs maintainers can publish a new version of EIEIO in GNU ELPA for older Emacs releases, just like they did for cl-generic and seq