[pro] Sensible interpretation of declarations in CLOS
Daniel Herring
dherring at tentpost.com
Mon Oct 29 15:35:24 UTC 2012
On Wed, 10 Oct 2012, Pascal Costanza wrote:
> Common Lisp in general has a more traditional performance model, in that it relies on staticish compilation for performance, rather than dynamic compilation as is done in Java, JavaScript, Lua, etc. With dynamic compilation, such
> issues may be easier to tackle, although I suspect that this would require still some non-trivial amount of research. (Changing the metaclass of a class needs to update not only the class, but also its instances, and since you
> potentially have an unlimited depth in the hierarchy of metaclasses, this can be quite complicated to express in a sane way.)
All these techniques boil down to partial evaluation. Still looking for a
language that allows good static PE (where time can be spent for deep
analysis), good dynamic PE (where data-specific behaviors can be
observed), and a good annotation mechanism for bringing it all together
(possibly allowing the programmer to describe behavior that crosses both
domains, but at least preserving dynamic info across processes).
> On 9 Oct 2012, at 22:44, Juan Jose Garcia-Ripoll <juanjose.garciaripoll at gmail.com> wrote:
>
> 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.
Slava Pestov did a few really nice things with Factor. In particular, he
had a mechanism that would dynamically trigger recompilation when "open
coded/inlined" details changed (e.g. macro redefintion). This declaration
would be a good point to store such a hook in CL...
http://factorcode.org/
http://docs.factorcode.org/content/article-vocabs.refresh.html
http://docs.factorcode.org/content/article-tuple-redefinition.html
- Daniel
More information about the pro
mailing list