emacs-devel
[Top][All Lists]
Advanced

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

Re: feature/type-hierarchy 8a63e50036f 1/5: * Define 'cl--type-hierarchy


From: Stefan Monnier
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
User-agent: Gnus/5.13 (Gnus v5.13)

> 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




reply via email to

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