Anyone have anything to say about Pure?
http://code.google.com/p/pure-lang/
The use of term rewriting as an essential part of a programming
language seems like a pretty interesting idea, and one that
I don't think I've encountered anywhere else. (Although the
site credits Michael O'Donnel as a pioneer, and mentions
OBJ and OPAL.)
Any views, pro or anti?
Marshall
Term rewriting underpins the Mathematica language and Wolfram Research push
it as one of their fundamental advantages over alternatives
(aka "everything is an expression"). Works well in Mathematica in terms of
generality but the performance is unbelievably bad: typically 1,000x slower
than C and much slower than interpreted languages like Python or OCaml
bytecode. Pure is built upon LLVM though, so it may not have such severe
performance problems.
IIRC, many "experts" in academia claimed that term rewriting is totally
unsuitable for programming because it is so easy to get unwanted infinite
loops by failing to consistently reduce expressions when rewriting.
However, Mathematica has long since proven that wrong.
I consider term rewriting to be a step beyond Lisp in terms of generality
and modern implementations with pattern matching are a step beyond Lisp in
terms of expressiveness.
However, I haven't found the time to play with Pure yet.
--
Dr Jon D Harrop, Flying Frog Consultancy Ltd.
http://www.ffconsultancy.com/?u
As I know, now the main beast in this niche is Maude. [shameless plug:
also look on termware for embedding term rewriting into Java
applications] Also most interpreters of lazy functional languages
[clean, haskell] use very similar technique of graph rewriting.
Pure is child of Q, when Q is child in Lisp family. Bring term
rewriting into LISP syntax can be interesting point in evolution of
LISP-based languages; from other point I can't understand why create
new language -- implements term-rewriting interpreter on top of exists
LISP system can be done with a very thin layer.
oops - it's not from Lisp. (I confuse Q with Qi ;)