Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Pure language; Term rewriting

11 views
Skip to first unread message

Marshall

unread,
Nov 28, 2009, 2:59:19 PM11/28/09
to
Hi all,

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

Jon Harrop

unread,
Nov 28, 2009, 5:57:18 PM11/28/09
to

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

rssh

unread,
Dec 13, 2009, 4:54:47 PM12/13/09
to
I want just note, that term rewriting is well known technique, which
exists at least 30 years.

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.

rssh

unread,
Dec 13, 2009, 6:22:30 PM12/13/09
to

> Pure is child of Q, when Q is child in Lisp family. Bring term

oops - it's not from Lisp. (I confuse Q with Qi ;)

0 new messages