From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#50777: Dropping EIEIO from xref (for performance) Date: Fri, 24 Sep 2021 10:49:24 -0400 Message-ID: References: <6b5b14d5-b2ca-8add-f4bf-a3405270c07a@yandex.ru> Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21240"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= , 50777@debbugs.gnu.org, Daniel =?UTF-8?Q?Mart=C3=ADn?= To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Sep 24 17:06:45 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1mTmmj-0005Lj-74 for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 24 Sep 2021 17:06:45 +0200 Original-Received: from localhost ([::1]:51790 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mTmmi-0004Y5-37 for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 24 Sep 2021 11:06:44 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55826) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mTmma-0004Xw-FL for bug-gnu-emacs@gnu.org; Fri, 24 Sep 2021 11:06:36 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:47476) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mTmma-0003NZ-07 for bug-gnu-emacs@gnu.org; Fri, 24 Sep 2021 11:06:36 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mTmWX-0001r0-Jj for bug-gnu-emacs@gnu.org; Fri, 24 Sep 2021 10:50:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 24 Sep 2021 14:50:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50777 X-GNU-PR-Package: emacs Original-Received: via spool by 50777-submit@debbugs.gnu.org id=B50777.16324949757076 (code B ref 50777); Fri, 24 Sep 2021 14:50:01 +0000 Original-Received: (at 50777) by debbugs.gnu.org; 24 Sep 2021 14:49:35 +0000 Original-Received: from localhost ([127.0.0.1]:59020 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mTmW7-0001q1-3k for submit@debbugs.gnu.org; Fri, 24 Sep 2021 10:49:35 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:46983) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mTmW4-0001pl-V9 for 50777@debbugs.gnu.org; Fri, 24 Sep 2021 10:49:33 -0400 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id D4EFC100261; Fri, 24 Sep 2021 10:49:26 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 4DB2410017A; Fri, 24 Sep 2021 10:49:25 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1632494965; bh=C+XQd/XtiLTlr7ryM3i0c/6DFW0XwqKvKqysVwUSRek=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=NzP5jik34hR89JhWW2AxIxwqWD5czt6Df++mI85cm8DbwGObGrt3KB3SQjtSOhLp5 rG74wLsyBZ2V7JV2qnhcHoFyuj5BfpQlfkIGHFpbQBO04mU5SS3X4cIIqGfDPwCirq 6A09LqKZATiAsV/lqk5CEgroFOPgl80rQnHY4lUYYY714ks76PNQ+uBxEz5f77A5KA P4/Mb1nL3GL5/btPf/CfQPRhJlUf2d6je0E8lsTwZu+AI3soxfm0u4HYhvXIp0O/NS vLWErRZiCKpacku8xYEv+EwLok/rHMO0WfQvnPK5PlofxVtA5K79XHjNvaX61Nk0+N KdVhHFv6aSoxw== Original-Received: from milanesa (unknown [45.72.241.23]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 07D4C1201CA; Fri, 24 Sep 2021 10:49:24 -0400 (EDT) In-Reply-To: (Dmitry Gutov's message of "Fri, 24 Sep 2021 16:37:25 +0300") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:215313 Archived-At: > That creates some incompatibility (third-party packages can't inherit from > 'xref-location' anymore, or use 'make-instance', 'oref' or 'with-slots' with > our values), About that: it should be fairly easy to get `make-instance`, `oref`, and `with-slots` to work with cl-defstruct objects/classes. This should be easy enough that we *could* potentially consider doing those changes "right away" (i.e. for Emacs-28). As for the inheritance, they can still inherit from `xref-location` but: - not with `defclass` (the subclass needs to be defined with `cl-defstruct` instead). - they can't inherit from both `xref-location` and something else any more. The second restriction could potentially be lifted without too much work (we could allow multiple inheritance as long as only one of the parents has fields, a bit like Java allows only one parent but multiple interfaces where interfaces can be though of "classes without fields"). I think the first restriction can be lifted as well under the constraint that `defclass` can only inherit from a single defstruct class that should be the first parent (since its fields need to be placed at the very beginning of the object). But I don't think those two additional changes would be in scope of Emacs-28. Stefan