GNU bug report logs -
#77725
31.0.50; Add support for types accepted by `cl-typep' to cl-generic?
Previous Next
Full log
View this message in rfc822 format
On 2025-04-25 21:37, Stefan Monnier wrote:
> [ Just tooting my horn, nothing to see. ]
>
>>> Here is a test case with a recursion:
>>>
>>> (cl-deftype T1 ()
>>> "Root type.
>>> Check if passed object is a subtype of T1. I.e., if T1 is present in
>>> object type parents."
>>> `(satisfies ,(lambda (o) (memq 'T1 (gtype-of o)))))
>>
>> Hmm... I can see that it could be handy if you don't know how to
>> characterize type T1 other than as the "sum" of its subtypes.
>> But this seems rather circular. Have you seen such things out in
>> the wild?
>
> BTW, this form of circularity is called an *impredicative* definition:
> the above definition does not directly refer to T1 (as in the case of
> a recursive definition), instead it refers (via the definition of
> `gtypes-of`) to the set of all types, to which T1 happens to belong.
>
> As it happens, the notion of *type* was invented/introduced by Bertrand
> Russel (early 20th century) specifically in order to try and disallow
> the kind of paradoxes (like Russel's paradox or the paradox of the
> barber) that impredicativity makes possible.
>
> OK, you can go back to your regularly scheduled ELisp hacking now,
Thank you! I always appreciate enriching my knowledge :-)
This bug report was last modified 10 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.