[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Eval - Pro's and Con's (was Re: Dylan rather than CL -- why?)



From: Stavros Macrakis <macrakis@osf.org>
/// There are legitimate applications for eval, and they have absolutely
/// nothing to do with the syntax of the language.  Perhaps you are
/// confusing syntax with the ability to manipulate syntax trees as data
/// structures?  Most language systems do not give you this capability,
/// but there's nothing inherent about it.

I don't mean to say there aren't 'legitimate' uses of eval.  There
are.  Unfortunately, eval, like nil, has earned LISP a rotten
reputation because of the haphazard treatment of the environment eval
is supposed to use.  Without dynamic scope, eval becomes near to
meaningless unless some way to specify an environment is provided.

I did list meta-interpretters and rule-based programming as
applications for eval.  I don't think they will be of interest to Dylan
developers because Apple has made quite an effort to emphasize that
Dylan is for application programming, not AI.  I for one am hard
pressed to find uses for eval that 'conventional' programmers would
want.  Eval is simply not conventional.

You're right about me mixing up the grammar issue, tho', but we _all_
have, by assuming that the underlying internal program representation
is lists (as opposed to, say, vectors).  The Dylan manual says nothing
about this, but it doesn't say anything about eval, either.  LISPs
_reader_ doesn't really do all the work I associate with parsing so I
tend to forget about it.  An Algol-style parser, tho' is quite a
different story.  I would expect a Dylan that provided eval to include
a <expression> class that would be used for programs; this is a less
biased (towards LISP) approach that seems more consistant with the rest
of Dylan.

How you'd get around Dylan's static scoping, tho' is another matter,
which would need another class (<environment>) and a heap of supporting
built-ins, and frankly I don't think the people at Apple are that
interested in fixing all of LISPs problems as much as making Dylan
palatable to those just being weened from 'C.'

	-- Scot