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

Issue: DECLARE-TYPE-FREE (Version 9)

Well, one of two things needs to be done (and fast!).  Either:

     enlarging the latter to cover PROCLAIM as well as DECLARE.

  2. keep two separate issues, but reconcile the semantics of
     nested, non-identical declarations.

Either way, the "reconcilation" will have to be done [I tend to
favor two separate issues at this point.]

I think you are right that the matter of semantics for nested declarations
isn't adequately treated in the DECLARE-TYPE-FREE proposal.  Sigh.  In
order to accommodate those who argued that mechanical code production
might not be able to guarantee a true SUBTYPE relation for the inner
declarations, I would go for a version that treated an inner declaration
as if it were the intersection of the outter one.  How about you?  In
the example:
   (proclaim '(type some-var (or symbol integer)))
   (let ((x (mumble)))
     (declare (type x number))
     (locally (declare (type x (or bit character)))
       ;; 'x' is effectively declared to be of type BIT here
the inner declarations are not subtypes of the outter ones, but at
least the intersections are non-null.

-- JonL --