Re: Very poor Lisp performance



Jon Harrop wrote:
Peter Seibel wrote:
There's certainly no concept of "macroexpansion time" and "run time"
like there is in CL,
So you cannot use macros to generate code to generate macros to
generate code in Lisp?
How on earth did you get from what Brian said to that.

I assume he meant Lisp is evaluated like this:

1. Macros are applied.
2. Resulting macro-free code is evaluated.

In which case (2) cannot generate more macros.

Almost. Macros can (and routinely do, in the case of Lisp's builtin functions!) call functions. Of course those functions could have been created with the help of macros...


You have to be careful in what order you load those macros and functions, especially when you redefine them.

--
I believe in Karma.  That means I can do bad things to people
all day long and I assume they deserve it.
	Dogbert
.



Relevant Pages

  • Re: New book about Common Lisp: Let Over Lambda
    ... I have read every lisp book I've been able to get my hands on ... Lisp macros are not given nearly enough ... I personally consider Let Over Lambda to be an unofficial sequel ... integral parts of the language. ...
    (comp.lang.lisp)
  • Re: LISPPA
    ... > which describes the unification algorithm in Scheme. ... But let's get back to why I think lisp is superior ... optimization macros or reader ... cases where a running program cannot continue running, ...
    (comp.lang.lisp)
  • Re: Macro functionality at runtime?
    ... we don't know what the subtree is yet. ... "Returns a list of tokens matched to subtree. ... > be optimized out by the lisp compiler. ... >> If we have first class macros, ...
    (comp.lang.lisp)
  • Re: What is the main advantage of macros over functions?
    ... if one is allergic to reading Lambda one may better not use ... Lisp authors, doesn't help you much, I'd say. ... >> Readmacros are a completely different mechanism. ... Macros and Readmacros ...
    (comp.lang.lisp)
  • Re: Python syntax in Lisp and Scheme
    ... Alex Martelli wrote: ... > I never used Common Lisp in production: in the period of my life when I ... > did not happen to use it in TI), with some of the divergence hinging on ... > locally developed sets of macros. ...
    (comp.lang.lisp)