Date: Tue, 05 Oct 1999 11:24:42 -0500
   From: Michael Hobbs <[EMAIL PROTECTED]>
   X-Accept-Language: en
   CC: [EMAIL PROTECTED]
   Content-Type: text/plain; charset=us-ascii
   Content-Length: 1026

   Clifford Beshers wrote:
   > All right, I'll take the bait.
   > 
   > The most important thing is to realize that we are discussing
   > computations that need to be done at compile time.  The results affect
   > the body of the source code.  Right now, the source code is
   > effectively required to be constant.  If we think in good functional
   > programming terms, we want to have the source code be the result of
   > some function.

   How about an `eval' Function?
   > eval :: String -> a
   It takes a chunk of Haskell code and evaluates it. Seen it done in Lisp
   many times.

Yuck.  This forces you to have a parser in your program.  This is
precisely what I want to avoid.  This is the sort of thing knee-jerk
think I would think of.  Sheard has done a much better job.

Haskell's strength comes from the extensive research into it's
design.  Why leave off and do the first thing that comes to mind when
making it more practical?

The eval capability is part of MetaML.  But the string that represents
the code is parsed at compile time, and a data structure is used
instead.

   It may not be the most efficient function in the world.

You can delete the ``may.''

   Perhaps you
   could use some sort of special syntax to notify the compiler that a
   particular string will be used in an `eval' application.

MetaML has special syntax, but not for specifying strings that need to
be parsed.  You write code inside <>, which is parsed at compile time
and the actual executable has a data structure representing the
function.  Exactly how it is implemented can vary, so long as the
semantics are correct.

   It can then try
   to thunk as much of it as it can prior to run-time. Perhaps all of it,
   depending on what's defined in the hypothetical SystemState module.


   Or were you thinking of something even more elegant?

Of course I want something more elegant.  Isn't that the whole point
of Haskell?


   (I must admit that I haven't looked at MetaML yet.)

When you do, you will understand why I want something more elegant.  I
don't mean to be insulting here.  I warned you I'd become a zealot :-)

It was really an eye opener for me, even though I didn't understand it
completely at the time through ignorance of ML in general.  I'm really
looking forward to getting back to it.

Cliff
-- 
Clifford Beshers                     Computer Graphics and User Interfaces Lab
[EMAIL PROTECTED]                         Department of Computer Science
http://www.cs.columbia.edu/~beshers                        Columbia University



Reply via email to