From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: feature/type-hierarchy 8a63e50036f 1/5: * Define 'cl--type-hierarchy' and compute 'cl--typeof-types' from it Date: Sun, 03 Mar 2024 15:41:01 -0500 Message-ID: References: <170801660982.26727.13226947668211497607@vcs2.savannah.gnu.org> <20240215170330.82819C0F009@vcs2.savannah.gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29305"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: emacs-devel@gnu.org To: Andrea Corallo Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Mar 03 21:42:00 2024 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 1rgsel-0007Sy-Kq for ged-emacs-devel@m.gmane-mx.org; Sun, 03 Mar 2024 21:42:00 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rgsdz-0002HI-17; Sun, 03 Mar 2024 15:41:11 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rgsdx-0002H8-Ba for emacs-devel@gnu.org; Sun, 03 Mar 2024 15:41:09 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rgsdu-0000kB-KZ; Sun, 03 Mar 2024 15:41:09 -0500 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 8FB06442AF9; Sun, 3 Mar 2024 15:41:03 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1709498462; bh=IxSYrarMnlGch9kukaG5tTKZP9uTJgX7IHXs8sOIpvI=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=XVOKnHc71exVlfjNWq6+oEwJ/66se2zw7ifGCK5BJko9bh9LreMJ6RG9PlPrQQIZM kDBew6pEGss0PJzuZOpkU7JmpaG1vP59DWoq3nVueEx8sp0vm1BDvGWsVo+gHooAWT 4rWgsQ4gLqtl7Nq2/0XSE8+Pyerd8LeNE5eS+B+2xKifHk391ZHOMpE0FMkfWgDUn/ sm6paXNLh0hq2N3sJZoIMsw+6651PNAmk+cCsGoD6rbKgUnluMFhi67UlkdeVTgghi M68nqnSEPiyQX+JZvlySx1XI0G17drFyk0hE1iQ7E0cLC2+6fFt2PwQNiLp/vFKW1t w/kQn/U6cghuw== Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 368AB442AF7; Sun, 3 Mar 2024 15:41:02 -0500 (EST) Original-Received: from pastel (unknown [104.247.233.29]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 115411202BE; Sun, 3 Mar 2024 15:41:02 -0500 (EST) In-Reply-To: (Andrea Corallo's message of "Sun, 03 Mar 2024 13:34:40 -0500") Received-SPF: pass client-ip=132.204.25.50; envelope-from=monnier@iro.umontreal.ca; helo=mailscanner.iro.umontreal.ca X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:316772 Archived-At: > Mmmh for class and structure I thought because we have 'class-p' and > 'cl-struct-p' we had the corresponding types (from which the user > defined ones are derived). IIRC I've seen also in the past we have the > class type. We do have types for them, but they're not built-in. There's `cl--class`, `cl-structure-object`, `cl-structure-class`, and some others I can't remember for EIEIO. > Anyway for this and the keyword thing I certainly don't have any strong > feeling/opinion, I've asked feedback on this hierarchy here since about > 4 months ago really because it's tricky. But I think it's really a good > exercise we (finally) spell it out and document it. I think if we want to do it right, we have to introduce a new `type-of` function which can return `boolean` for `t`, and various other backward incompatible changes, and make sure the DAG is "complete" (e.g. add `keyword-sym-pos`, `list-and-function`, `subr-function`, and `special-form`). But there hasn't been much concrete need for it, so we may as well keep it for later if/when we actually need something like that. Stefan