Re: Lisp's QUOTE and Mathematica's "Hold"
- From: Nathan Baum <nathan_baum@xxxxxxxxxxxxxx>
- Date: Sun, 21 Aug 2005 04:45:59 +0100
Jon Harrop wrote:
i.e., Hold "sticks" with the expression, whereas QUOTE is just a signal to the evaluator to pass its contents through unevaluated. You can't build something as simple as QUOTE in Mathematica because the evaluator will keep evaluating until it stops changing - the CL QUOTE would be a noop in the Mathematica evaluator.
You can see Hold in Mathematica but not QUOTE in Lisp but isn't that more a function of the pretty printer rather than the evaluation?
No, it's a function of it not being there.
A => <the value of A> 'A => A ''A => 'A a.k.a. (QUOTE A)
This distinction is very significant, because QUOTE only 'protects' against one round of evaluation.
(EVAL A) => <the result of evaluating the value of A> (EVAL 'A) => <the value of A> (EVAL ''A) => A
In a hypothetical Mathematica-like dialect of Lisp,
A => <the value of A> 'A => <the value of A> ''A => <the value of A> (EVAL A) => <the value of A> (EVAL 'A) => <the value of A> (EVAL ''A) => <the value of A>
Beyond that, evaluation is completely different. But just looking at QUOTE and Hold, there is an uncanny resemblance.
If you ignore the name, syntax and behaviour. .
- Follow-Ups:
- Re: Lisp's QUOTE and Mathematica's "Hold"
- From: Jon Harrop
- 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
- Very poor Lisp performance
- Prev by Date: Re: Lisp/Unix impedance [a programming challenge]
- Next by Date: Re: Lisp's QUOTE and Mathematica's "Hold"
- 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
|