guile-devel
[Top][All Lists]
Advanced

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

Elisp flet construct


From: Daniel Kraft
Subject: Elisp flet construct
Date: Mon, 20 Jul 2009 19:53:09 +0200
User-agent: Thunderbird 2.0.0.0 (X11/20070425)

Hi all,

in the %nil thread a suggestion was brought up to support the `flet' construct (and `flet*' as well, if we choose to do so at all, I favour) in Guile's upcoming elisp implementation that behaves just like a let for function-slot bindings, enabling dynamic scoping for them.

It is no "official" elisp construct, but according to what I heard there, can be useful at some times (I guess the use is mainly to locally alter bindings of standard functions for some code executed without a risk of permanently messing things up). So I don't know how you regard addition of "extensions"...?

From an implementation point of view, I see both an argument against and in favour of this extension:

* As implemented at the moment, it would be fairly easy to add flet/flet* to the compiler.

* If we do not implement flet, we can implement the function-slots without indirection via fluids but rather use the Guile symbol bindings directly. This is for sure a simplification especially performance wise, but I can't say how much it really affects. Most bindings in use are, I guess, variables, so we save the fluid-references only in a fraction of cases.

Any comments welcome, so we can decide upon this.

Thanks,
Daniel

--
Done:  Arc-Bar-Cav-Ran-Rog-Sam-Tou-Val-Wiz
To go: Hea-Kni-Mon-Pri




reply via email to

[Prev in Thread] Current Thread [Next in Thread]