Search the FAQ Archives

3 - A - B - C - D - E - F - G - H - I - J - K - L - M
N - O - P - Q - R - S - T - U - V - W - X - Y - Z
faqs.org - Internet FAQ Archives

FAQ: Scheme Frequently Asked Questions 1/2 [Monthly posting]
Section - [1-14] Why is there no EVAL in Scheme?

( Part1 - Part2 - Single Page )
[ Usenet FAQs | Web FAQs | Documents | RFC Index | Sex offenders ]


Top Document: FAQ: Scheme Frequently Asked Questions 1/2 [Monthly posting]
Previous Document: [1-13] What does SICP, SCOOPS, R4RS, CAR, CDR, ... mean?
Next Document: [1-15] World-Wide Web (WWW) Resources
See reader questions & answers on this topic! - Help others by sharing your knowledge

The answer to this question is based on information provided by 
Guillermo J. Rozas and Aubrey Jaffer.

There are three major positions in the Scheme community regarding EVAL:

   1. No EVAL: EVAL is antithetical to a Pascal-like (compiler based,
      externally statically linked) implementation for Scheme, such as
      some people have or wish to see. 

   2. Single Argument: There is a single distinguished top-level
      environment, and EVAL always evaluates its argument there. 
      (This is the approach taken in Common Lisp, where EVAL evaluates
      its argument in the current dynamic environment and in a null
      lexical environment.) 

   3. Two Arguments: There are multiple environments in which
      the user might want to evaluate expressions, so EVAL should take
      two arguments, the second being an environment.  In particular,
      in some systems with first-class environments, there is no
      a-priori single distinguished top-level environment, and
      defaulting the environment does not fit those dialects well.

Not every dialect of Scheme has EVAL. Most do, but some with different
names and arguments. Jaffer's SLIB package uses LOAD as defined in
R4RS to define EVAL for those implementations that don't support EVAL
(e.g., by writing the code out to a file and then loading it).
Rozas's compromise proposal for EVAL was accepted for R5RS, but it is
unclear whether there will ever be a R5RS.

User Contributions:

Comment about this article, ask questions, or add new information about this topic:

CAPTCHA




Top Document: FAQ: Scheme Frequently Asked Questions 1/2 [Monthly posting]
Previous Document: [1-13] What does SICP, SCOOPS, R4RS, CAR, CDR, ... mean?
Next Document: [1-15] World-Wide Web (WWW) Resources

Part1 - Part2 - Single Page

[ Usenet FAQs | Web FAQs | Documents | RFC Index ]

Send corrections/additions to the FAQ Maintainer:
ai+lisp-faq@cs.cmu.edu





Last Update March 27 2014 @ 02:12 PM