Re: Lisp's QUOTE and Mathematica's "Hold"



Jon Harrop wrote:
Nathan Baum wrote:

You misunderstand me. I mean that the Mathematica equivalent of 'X,
which I suppose is just (X), would behave that way.


I don't understand. The Mathematica equivalent of 'X is Hold[X]?

No. Because Mathematica has a wildly different evaluation model, its equivalent of 'X is simply (X) -- Mathematica keeps evaluating until an expression doesn't change. 'X changes when it is evaluated, and therefore, from Mathematica's point of view, 'X is equivalent to (X).



Note that this has nothing to do with the similarity between QUOTE and Hold. This is entirely to do with evaluation semantics, which are definitely not the same.


How do you propose to judge the similarity of QUOTE and Hold _without_ considering how they effect the evaluation of expressions?
.




Relevant Pages

  • Re: Lisps QUOTE and Mathematicas "Hold"
    ... which I suppose is just, would behave that way. ... So all Mathematica equivalents must be quoted at least once. ... So cannot be a Lisp equivalent of anything in Mathematica, ... This is entirely to do with evaluation semantics, which are definitely not the same. ...
    (comp.lang.lisp)
  • Re: Lisps QUOTE and Mathematicas "Hold"
    ... which I suppose is just, would behave that way. ... Mathematica has no _real_ equivalent of Lisp's QUOTE, since Mathematica 'fully evaluates' every expression: i.e. keeps evaluating it until further evaluation will not produce a different value. ...
    (comp.lang.lisp)