Re: Lisp's QUOTE and Mathematica's "Hold"
- From: Jon Harrop <usenet@xxxxxxxxxxxxxx>
- Date: Mon, 22 Aug 2005 10:20:25 +0100
Peter Seibel wrote:
> Then you should check out Lisp.
:-)
> Macros are interesting in this context
> insofar as they are an *example* of a part of Lisp that depends on the
> ability to write code in Lisp that does AST->AST transformations.[1]
But Lisp functions can also do AST -> AST transformations using the built-in
AST type, available via QUOTE but you never want to EVAL them. Is that
about right?
> But ultimately macros are for producing Lisp code. If you just want
> to manipulate arbitrary ASTs and/or if you ultimately want to produce
> some other form of output (such as code in another language or machine
> code or typeset math) then these Lisp features are what you should be
> looking at:
> ...
I'll check them out, thanks.
> and ... wait for it ...
>
> - QUOTE.
In ML you'd define your own AST type and use pattern matching to manipulate
values of that type. Am I right in thinking that, in Lisp, you would use
Quote to build a Lisp-like AST instead of defining your own AST type?
--
Dr Jon D Harrop, Flying Frog Consultancy
http://www.ffconsultancy.com
.
- Follow-Ups:
- Re: Lisp's QUOTE and Mathematica's "Hold"
- From: Peter Seibel
- Re: Lisp's QUOTE and Mathematica's "Hold"
- From: M Jared Finder
- Re: Lisp's QUOTE and Mathematica's "Hold"
- References:
- Very poor Lisp performance
- From: Jon Harrop
- Re: Very poor Lisp performance
- From: Jon Harrop
- Re: Very poor Lisp performance
- From: Ulrich Hobelmann
- Re: Very poor Lisp performance
- From: Jon Harrop
- Re: Very poor Lisp performance
- From: Brian Downing
- Re: Lisp's QUOTE and Mathematica's "Hold"
- From: Jon Harrop
- Re: Lisp's QUOTE and Mathematica's "Hold"
- From: Nathan Baum
- Re: Lisp's QUOTE and Mathematica's "Hold"
- From: Jon Harrop
- Re: Lisp's QUOTE and Mathematica's "Hold"
- From: Nathan Baum
- Re: Lisp's QUOTE and Mathematica's "Hold"
- From: Jon Harrop
- Re: Lisp's QUOTE and Mathematica's "Hold"
- From: Nathan Baum
- Re: Lisp's QUOTE and Mathematica's "Hold"
- From: Jon Harrop
- Re: Lisp's QUOTE and Mathematica's "Hold"
- From: Nathan Baum
- Re: Lisp's QUOTE and Mathematica's "Hold"
- From: Jon Harrop
- Re: Lisp's QUOTE and Mathematica's "Hold"
- From: Nathan Baum
- Re: Lisp's QUOTE and Mathematica's "Hold"
- From: Jon Harrop
- Re: Lisp's QUOTE and Mathematica's "Hold"
- From: Richard Fateman
- Re: Lisp's QUOTE and Mathematica's "Hold"
- From: Jon Harrop
- Re: Lisp's QUOTE and Mathematica's "Hold"
- From: Peter Seibel
- Very poor Lisp performance
- Prev by Date: Re: Lisp semantics vs. Mathematica semantics
- Next by Date: Re: Very poor Lisp performance
- Previous by thread: Re: Lisp's QUOTE and Mathematica's "Hold"
- Next by thread: Re: Lisp's QUOTE and Mathematica's "Hold"
- Index(es):
Relevant Pages
|