Re: Where comes the myth that Lisp is interpreted?!
- From: Jens Axel Søgaard <usenet@xxxxxxxxxxxx>
- Date: Mon, 21 Aug 2006 19:52:26 +0200
Rob Thorpe skrev:
Once Jon Harrop wrote an interpreter that performed the important core
operations of Mathematica in OCaml. His version was much, much simpler
than the C version and still quite fast. He showed this to Wolfram
software but they weren't interested in changing their program.
Once you put in the quirks...
A.4.1 The Standard Evaluation Sequence
The following is the sequence of steps that Mathematica follows in evaluating an expression like h[ , , ... ]. Every time the expression changes, Mathematica effectively starts the evaluation sequence over again.
- If the expression is a raw object (e.g., Integer, String, etc.),
leave it unchanged.
- Evaluate the head h of the expression.
- Evaluate each element of the expression in turn. If h is a symbol with
attributes HoldFirst, HoldRest, HoldAll or HoldAllComplete, then skip
evaluation of certain elements.
- Unless h has attribute HoldAllComplete strip the outermost of any
Unevaluated wrappers that appear in the .
- Unless h has attribute SequenceHold, flatten out all Sequence objects
that appear among the .
- If h has attribute Flat, then flatten out all nested expressions with
head h.
- If h has attribute Listable, then thread through any that are lists.
- If h has attribute Orderless, then sort the into order.
- Unless h has attribute HoldAllComplete, use any applicable
transformation rules associated with f that you have defined for
objects of the form h[ f[ , ... ], ... ].
- Use any built-in transformation rules associated with f for objects of
the form h[ f[ , ... ], ... ].
- Use any applicable transformation rules that you have defined for
h[ , , ... ] or for h[ ... ][ ... ].
- Use any built-in transformation rules for h[ , , ... ] or for
h[ ... ][ ... ].
Nice and simple...
But wait! There is more:
A.4.2 Non-Standard Argument Evaluation
A.4.3 Overriding Non-Standard Argument Evaluation
A.4.4 Preventing Evaluation
A.4.5 Global Control of Evaluation
A.4.6 Aborts
<http://documents.wolfram.com/mathematica/TheMathematicaBook/MathematicaReferenceGuide/Evaluation/>
--
Jens Axel Søgaard
.
- Follow-Ups:
- Re: Where comes the myth that Lisp is interpreted?!
- From: John Thingstad
- Re: Where comes the myth that Lisp is interpreted?!
- References:
- Where comes the myth that Lisp is interpreted?!
- From: Pierre THIERRY
- Re: Where comes the myth that Lisp is interpreted?!
- From: Rob Thorpe
- Re: Where comes the myth that Lisp is interpreted?!
- From: George Neuner
- Re: Where comes the myth that Lisp is interpreted?!
- From: JShrager
- Re: Where comes the myth that Lisp is interpreted?!
- From: Duane Rettig
- Re: Where comes the myth that Lisp is interpreted?!
- From: Markus Grueneis
- Re: Where comes the myth that Lisp is interpreted?!
- From: Rob Thorpe
- Where comes the myth that Lisp is interpreted?!
- Prev by Date: Re: The Weakness of Lisp
- Next by Date: Re: Where comes the myth that Lisp is interpreted?!
- Previous by thread: Re: Where comes the myth that Lisp is interpreted?!
- Next by thread: Re: Where comes the myth that Lisp is interpreted?!
- Index(es):
Relevant Pages
|