[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: "common-lisp" <common-lisp@su-ai.ARPA>
- Subject: LET-IF
- From: "BACH::ROBBINS" <email@example.com>
- Date: 0 0 00:00:00 EST
- Cc: robbins
- Reply-to: "BACH::ROBBINS" <firstname.lastname@example.org>
I will give an example to illustrate why I think that we need LET-IF.
If there is a clean way to get around my need for a conditional bind,
then please let me know.
(defun f ()
;; large body that will call f recursively and possibly set *flag*
;; perform special processing
I don't want to have to double the size of the function by having the body
I can't use catch and throw when the event happens because I only wish to
note that the event has happened, not terminate processing.
The function f is to be called very frequently and I want it to be as
fast as possible, hence PROGV seems like overkill.
Binding *flag* to a mutable object ...
(let ((*flag* (if (condition) (cons nil nil) *flag*))) ...
seems like a real hack.