[pro] Sensible interpretation of declarations in CLOS
Juan Jose Garcia-Ripoll
juanjose.garciaripoll at gmail.com
Tue Oct 9 20:44:14 UTC 2012
I am retaking an old question, which is the utility of type declarations in
a language that has the flexibility of the MOP.
In an extremely open-minded setup, where any class is prone to change, not
only their structure, but also their metaclass, it would seem that a local
declaration of the kind (DECLARE (MY-CLASS FOO)) would be totally useless.
But... do you actually face that flexibility in real life? I mean,
declarations such as (DECLARE (TYPE MY-INTEGER-TYPE FOO)) are used in
actual code, where there is an implicit contract that the DEFTYPE type will
not be changed in unsafe code. Can't we assume something similar when
facing CLOS? What would be a reasonable optimization/safety/debug level to
start considering that?
Instituto de Física Fundamental, CSIC
c/ Serrano, 113b, Madrid 28006 (Spain)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the pro