[clean-list] "code is data" and Clean

Mark Phillips marrieda@lawyer.com
Thu, 27 Feb 2003 19:44:35 -0500


Hi,

One of the key advantages of LISP (as far as I can tell) is
that its relatively simple (yet powerful) syntax means that
LISP _code_ looks just like the _data_ it works on.  Because
of this, it is possible to manipulate LISP code in the same
way, using the same powerful functions, that are used with
data.  This ability enables one to write even more powerful
functions, and potentially more efficient ones.

In LISP, code is just lists inside lists (a tree-like 
structure).  Because of the simple (yet flexible) syntax
for code, it makes writing code-manipulating functions quite
easy to do.  LISP proponents seem to argue that newer functional
languages (like Haskell and Clean etc) are actually a step 
backwards because - with their more convoluted syntax - they've
thrown away the ability to easily write code-manipulating-code.

What I would like to know from the clean community (and perhaps
developers) is: how much validity is there to this point?

Is it a case of "Clean has thrown away the ability to easily
write code manipulating code in exchange for some other goodies
which we value more".  If so, what are these other goodies and
why are they worth more than code-manipulating-code ability.

But I wonder whether Clean really has thrown away the code
manipulating code capability.  I have never programmed in
Clean (I've used Haskell), but I did read something about
Clean working with "computational graphs" or something like
that.  Ie, where LISP works with code as hierachical lists of
lists (ie a tree), does Clean work with code as a graph?  In
which case Clean is potentially more powerful (and more
computationally efficient) in this regard than LISP!!  Because
trees are a special case of a graph, and what's more, a tree
with "isomorphic sub-trees" can sometimes be expressed more
succinctly as a graph.

Well, I don't know Clean (or LISP) well enough to be able to
discern whether my ideas are on the right track or not.  Any
assistance with my thinking would be greatly appreciated.

Thanks,

Mark.

-- 
__________________________________________________________
Sign-up for your own FREE Personalized E-mail at Mail.com
http://www.mail.com/?sr=signup