Re: Lisp and Scheme with fewer parentheses / Mathematica??



Xah Lee wrote:
So, of course i'm not arguing that lisp and Mathematica have the same
evaluation models. I'm saying, as well as Jon is saying, that
programing in Mathematica is like in sense a glorified (or extened)
macros system as used in lisp.

Exactly.

In fact, one might argue, that the
concept of so-called rule-based system or term-rewritting is developed
from lisp. (after all, it is almost the case that any advanced
functional programing concepts has origin or trace of origin from
lisp, because after all, lisp is for all practical purposes the first
functional language and one of the oldest language)

Actually I would argue the opposite. Term rewriting is fundamental to
mathematics and predates Lisp and even the lambda calculus by hundreds if
not thousands of years.

PS It is not correct to say that Mathematica relies on pattern
matching or term-rewriting as its core computational model. Because,
in Mathematica, there are pure function ?Function? (lambda) construct,
as well as many imperative language constructs that cannot be
explained by pattern matching.

You might not be able to get far using pattern matching alone but you can
implement virtually everything using only term rewriting. This is exactly
how I bootstrapped my Mathematica JIT compiler in OCaml.

(a simple example: ?x++? or the
syntactically equivalent ?Increment[x]?) In fact, it is not possible
to write any non-trivial programs in Mathematica by using only pattern
matching. In my over a decade programing with Mathematica (mostly
active in the 1990s, i actually avoid pattern matching, for reasons
that in general pattern matching is somewhat unpredictable, and code
based on it is not so portable since other langs don't have it.)

Yes. One of the practical problems with Mathematica's pattern matching is
that it goes well beyond the linear patterns of ML and allows patterns to
have arbitrarily high asymptotic complexities. Consequently, the complexity
of almost any non-trivial pattern match is undefined.

--
Dr Jon D Harrop, Flying Frog Consultancy Ltd.
http://www.ffconsultancy.com/products/?u
.



Relevant Pages

  • Re: why do you choose LISP?
    ... i like lisp primarily bceause it is a functional lang. ... It is also during the early 1990s, i started to learn programing on my ... during these years i bought Mathematica (because i heard it's the ... I do not have any concrete idea what IS a language specification ...
    (comp.lang.lisp)
  • Re: SBCL is now faster than Java, as fast as Ocaml, and getting better
    ... amount to learn from Mathematica because it addressed so many of Lisp's ... What do you think Mathematica can learn from Lisp? ... are overestimating the "language merits" of Mathematica as far as its ... go beyond our discussion of Lisp, MLish and pattern matching. ...
    (comp.lang.lisp)
  • Re: Lisp and Scheme with fewer parentheses / Mathematica??
    ... Any dummy, at our level, knew that Mathematica and lisp have different ... programer, even with say 10 years of programing experience, chances ... functional language and one of the oldest language) ...
    (comp.lang.lisp)
  • Re: SBCL is now faster than Java, as fast as Ocaml, and getting better
    ... I think the Lisp community have a huge ... Mathematica is no more Conses deep down. ... extended OCaml's ordinary pattern matching to also support regular ... am going to write a type inferencing engine for CL. ...
    (comp.lang.lisp)
  • Re: Benefits of Dynamic Typing
    ... I would say that Lisp has been displaced by faster languages ... I am still trying to find any applications where Lisp can ... From your point of view and experience Mathematica might ... > Yet when they want pattern matching they use an ad hoc informally-specified ...
    (comp.lang.functional)