[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Declarations in event case body
Your message:
...
This arrangement does not allow for declarations of the bound variables
-- the
declaration cannot be inside the progn, it must be the first form insid
e the
let. Being able to declare these variables would be quite useful, as t
he only
other way to, for example, say that 'x' is a int16 is to rebind 'x' or
use
lots of THE statements.
To fix this involves more than a small change, so it's not gonna get fixed
in
R4, so I recommending rebinding x. It expands to a progn because
event-dispatch wants only one form there, that one form is used as the
predicate as to whether to discard the event or not.
Don't you think CLX should be putting in the type declarations itself, so y
ou
don't have to? It seems to me that's the real way to fix this.
--------
Well, the problem with CLX including declarations is that the user could:
(setf x nil)
not knowing that x is declared to be an (integer -32768 32767), since she
didn't put that declaration in the code herself.
However it would be very nice to have a version of event-case that
automatically produced these declarations. Perhaps there should be another
event-case exported macro? I can't think of a better way to control generation
of the declares...
-- John