[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: SUBTYPEP-TOO-VAGUE (initial draft)
- To: Eric Benson <firstname.lastname@example.org>
- Subject: Re: SUBTYPEP-TOO-VAGUE (initial draft)
- From: Rob.MacLachlan@WB1.CS.CMU.EDU
- Date: Tue, 12 Jul 88 15:50:23 EDT
- Cc: email@example.com, firstname.lastname@example.org
- In-reply-to: Your message of Mon, 11 Jul 88 17:27:00 -0700. <8807120027.AA00951@blacksox.lucid.com>
From: Eric Benson <email@example.com>
Subject: SUBTYPEP-TOO-VAGUE (initial draft)
AND, OR and NOT are only messy to deal with if any of the type
specifiers involved use SATISFIES. Otherwise they are well defined.
I think you should remove AND, OR and NOT from the "exceptions list."
I would change that to say that AND OR and NOT are only *impossible* when
they involve uses of SATISFIES. They are plenty messy otherwise. In a
compiler I am working on, I have 1500 lines of hairy and reasonably dense
code for a SUBTYPEP that only partially understands OR and AND, and doesn't
handle NOT at all. I strongly recommend that SUBTYPEP not be made too firm
until a public domain SUBTYPEP that implements the proposal is available.
'(or (rational * (6)) (member 6) (integer 7 *)))
It is fairly easy to see that this is true, but not so easy to see how to
to write a program to solve the general problem. It might even be a Hard
Problem, given that we have the capability to describe infinite sets.
Even Sandra's proposal may be more hairy than it is worth forcing on the
Common Lisp community. The MEMBER specifier can also be pretty perverse,
(subtypep '(integer 3 11) '(member 3 4 9 5 6 10 7 11 8 17 15)) => T, T
Any how many SUBTYPEPs correctly recognize that float types are finite?
(subtypep `(short-float 0s0 (,(* short-float-epsilon 4)))
,(* short-float-epsilon 1)
,(* short-float-epsilon 2)
,(* short-float-epsilon 3))) => T, T