www.delorie.com/gnu/docs/guile/guile_403.html   search  
 
Buy GNU books!


Guile Reference Manual

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

36.3 Strange Variations on eval

eval2 was useful in previous Guile releases because the eval in those releases was a single argument eval that did not conform to R5RS. Guile's standard eval now requires a second environment-specifier argument (which Guile interprets as the module in which to evaluate the specified code expression). Hence eval is now R5RS-compliant, and eval2 is obsolete and therefore deprecated.

Deprecated Scheme Procedure: eval2 obj env_thunk
Deprecated C Function: scm_eval2 (obj, env_thunk)
Evaluate exp, a Scheme expression, in the environment designated by lookup, a symbol-lookup function. Do not use this version of eval, it does not play well with the module system. Use eval or primitive-eval instead.

In previous Guile releases, the implementation of expressions like (eval (read port)) was deficient in that source properties associated with the expression returned by the read would be lost during the eval. To provide a way of performing a read and evaluation without losing source properties, read-and-eval! was invented.

In this Guile release, evaluation always preserves source property information. So read-and-eval! is now unnecessary.

Deprecated Scheme Procedure: read-and-eval! [port]
Deprecated C Function: scm_read_and_eval_x (port)
Read a form from port (standard input by default), and evaluate it (memoizing it in the process) in the top-level environment. If no data is left to be read from port, an end-of-file error is signalled.


  webmaster     delorie software   privacy  
  Copyright 2003   by The Free Software Foundation     Updated Jun 2003