[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Eval - Pro's and Con's (was Re: Dylan rather than CL -- why?)
- To: email@example.com
- Subject: Eval - Pro's and Con's (was Re: Dylan rather than CL -- why?)
- From: firstname.lastname@example.org
- Date: Mon, 07 Dec 92 11:18:23 EST
- Posted-date: Mon, 07 Dec 92 11:18:23 EST
Scot Dyer (email@example.com) writes:
I think leaving eval out of the spec was an error,
since only those who use it must pay the price...
I think an operator like EVAL might be rather complicated in a
language with multiple syntaxes, such as Dylan is intended to be.
Must EVAL handle all possible syntaxes, e.g.
(EVAL '(SET! Y (+ X 2))) ; Lisp-like syntax
(EVAL "y = x + 2 ;") ; Algol-like syntax
... ; etc.
Note that there are almost certainly expressions that are ambiguous,
unless the syntax is specified (in a keyword argument?).
Also note that EVAL for non-LISP syntaxes is probably quite
complicated, and must include a lexer and all the attendant machinery.
This problem might be simplified by having the EVAL module define
object types to represent syntax-independent program-fragments. These
might be necessary anyway, for a multiple-syntax language. EVAL would
be handed such structures, instead of syntactic expressions. (Is it
the Pop language that has these sorts of structures?)
I'm fairly agnostic about all of this, however. I never use EVAL in
Lisp, and the only excusable use for it I can see is READ-EVAL-PRINT
loops in certain kinds of user interfaces, such as programming
environments. Which is what started this discussion ...