From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Andrea Corallo Newsgroups: gmane.emacs.devel Subject: Re: feature/type-hierarchy 8a63e50036f 1/5: * Define 'cl--type-hierarchy' and compute 'cl--typeof-types' from it Date: Mon, 04 Mar 2024 04:24:06 -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; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="5109"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Mar 04 10:25: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 1rh4ZA-00013j-8M for ged-emacs-devel@m.gmane-mx.org; Mon, 04 Mar 2024 10:25:00 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rh4YM-00065v-0M; Mon, 04 Mar 2024 04:24:10 -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 1rh4YK-00065g-Mp for emacs-devel@gnu.org; Mon, 04 Mar 2024 04:24:08 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rh4YK-0004k4-5j; Mon, 04 Mar 2024 04:24:08 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=jGfVlhtRbHfMZy6B/hre1j/BB7hQnA81arCVW7U2tgw=; b=Czg3+bkzyX2dicWmOJMu nPCVXP0umcZUAqxLNsQdVnx0zO5rTFhvquXgS5abalLLbStrmm+A7s0TptbcqBJk388481AcmnXSC Fq+sgH7eGy3QAOrpc+bkqOIV/UXkI3DmbD3o2A/mClaR5WlnOXYFhl4I8jBld9PEFCFO2Irls/TF7 yeW5pSPbXkHRo/rsNSul3V6ZpK/9iKs97xFjbVg7zDJjedGKHPdx4K1yPDI5Y4arEs7VZYW7taZlL naC0VN9o88hHxVMc47lBPr+xVcVur1vL0X4E+Y7N45ymLVvFwYNnM0+3Ikhtg4meJmVgYDBxU2tV0 JC0Fb1jvMVfT9w==; Original-Received: from acorallo by fencepost.gnu.org with local (Exim 4.90_1) (envelope-from ) id 1rh4YI-00061T-5S; Mon, 04 Mar 2024 04:24:06 -0500 In-Reply-To: (Stefan Monnier's message of "Sun, 03 Mar 2024 15:42:55 -0500") 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:316783 Archived-At: Stefan Monnier writes: >>>>>> The original was inconsistent on this, >>>>> Maybe that was an oversight. >>>>> Do you remember which inconsistency you had noticed in this respect? >>>> I remember (symbol-with-pos symbol atom) (symbol atom), there might ha= ve >>>> been others. >>> I think I see. By "leaf" I really meant "non abstract": both `symbol` >>> and `symbol-with-pos` describe *the* type of some objects (IOW `type-of` >>> can return that symbol), as opposed to things like `sequence`, `list`, >>> atom`, `number-or-marker`, ... >> Ah! Mmmh then is not so simple... > > It's not complicated either, but I guess what you mean is that the DAG > doesn't have enough info, and there I can I agree (which is why in the > previous code we generated the DAG from `cl--typeof-types` instead of > the reverse =F0=9F=99=82). My 2 cents. I see `cl--typeof-types` for the nature of its non trivial format and caveats as an internal representation that was layout-ed like it is for some specific internal machinery. I find more convenient how we can express the DAG now (and generate `cl--typeof-types` automatically from it). Andrea