Re: warn if not top-level?



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.
.



Relevant Pages

  • Re: modifying array access syntax
    ... I published recent speculation on the ARRAY ... > are in fact remnants of the property lists of these Lisp-N ... these that were meaningful at compile time (FEXPR, FSUBR, and MACRO ...
    (comp.lang.lisp)
  • Re: DISFAVORED Was: name for 3 PICK finally?
    ... complexity is reduced by reducing the phases of execution to keep ... outside happens when the word containing the macro executes. ... LITERAL COMPILE, .... ... ``GET LITERAL @ LITERAL `EXECUTE COMPILE,'' ...
    (comp.lang.forth)
  • Re: Open stack and colon definitions as a features (was: Of course it IS!!!)
    ... execute at compile time like immediate words did thirty years ... So now we also know what color a macro has: ... In Chuck's colorforth green is more like "]" and yellow is ... They do something more like change the system's STATE to execute ...
    (comp.lang.forth)
  • Re: Open stack and colon definitions as a features (was: Of course it IS!!!)
    ... forth and macro. ... execute at compile time like immediate words did thirty years ... They do something more like change the system's STATE to execute ... the only thing I know is that it uses colors to specify ...
    (comp.lang.forth)
  • Re: redefine Normal style in Word 2004
    ... Redefine Style has redefined the Normal ... I see absolutely no reason to have changed this. ... Take a look at the macro in appendix E ... Variants of this macro allow me to change the font of a style. ...
    (microsoft.public.mac.office.word)