Re: warn if not top-level?
- From: Chris Riesbeck <criesbeck@xxxxxxxxx>
- Date: Tue, 28 Jun 2005 12:32:52 -0500
In article <wyfwe.63604$wr.56136@clgrps12>,
"Coby Beck" <cbeck@xxxxxxxxxxxxx> wrote:
> "Chris Riesbeck" <criesbeck@xxxxxxxxx> wrote in message
> news:criesbeck-B9D9F5.14095027062005@xxxxxxxxxxxxxxxxx
> >
> > I would like to warn users that code like
> >
> > (DEFUN MY-TESTS () (RUN-TESTS ...))
> >
> > may be a mistake, since the code saved in MY-TESTS will
> > no longer be updated when tests are updated or macros
> > are redefined.
>
> I know "don't do it" is an unsatisfying answer to "how do I do it?" but that
> is probably mine in this case. The
> "redefined-macro-mean-recompile-all-uses" rule must be well learned, usually
> through pain therapy. You might do someone a very small favor with all your
> contortions but it won't help them with all the cases where the function
> called by run-tests contains old macro expansions (and may simply delay the
> learning of the important lesson). Everybody either knows or must soon
> learn that when you redefine a macro, you must recompile everything that
> uses it.
While this is certainly true for most code, it goes
against the central point of test-driven development.
For now, I've decided to go the run-time evaluation
route.
Any comparative pros and cons regarding EVAL, COMPILE
and COERCE for turning a LAMBDA form into runnable code?
I'm using COERCE, as possibly simpler than EVAL,
and possibly faster than creating compiled code
than COMPILE, based on some prior discussions I've found.
.
- Follow-Ups:
- Re: warn if not top-level?
- From: Coby Beck
- Re: warn if not top-level?
- References:
- warn if not top-level?
- From: Chris Riesbeck
- Re: warn if not top-level?
- From: Coby Beck
- warn if not top-level?
- Prev by Date: Re: Having trouble deleting first item in list
- Next by Date: Re: I can't find which line is causing the error
- Previous by thread: Re: warn if not top-level?
- Next by thread: Re: warn if not top-level?
- Index(es):
Relevant Pages
|