On Sunday, November 30, 2014 12:30:02 PM UTC-8, Joachim Durchholz wrote:
.... snip... 

>
> >> Partial evaluation isn't doable at all. 
> >> 
> > I don't know what you mean by partial evaluation. 
>
> Difference between lazy and eager evaluation. 
>
>  > Is this something you 
> > think that Lisp does?  Maybe confused about quote? 
>
> Quote is Lisp's way of deferring evaluation, yes. 
> Well, sort of, unevaluated expressions are also lists. 
>
>  I don't think of quote that way at all.  '(a b c d) builds a list 
structure with
4 elements in it.  It does not mean there is a function named "a"  that is
going to be applied at some future time.  Maybe there is such a function
and you might later write  (eval s)  where s is (a b c d) but that is
highly unlikely.  Calls to eval are extremely rare.  There are hundreds of
thousands of lines of Lisp in Maxima.  I would be surprised if eval was
used even once.

There is also the thorny question of the environment to be used for 
evaluation.
e.g.
  what is to be done in

(let ((a '+)
       (b 43))
 (eval s) )

does a, b, have bindings from when one did (setq s '(a b c d))?
or the new lexical bindings.

Anyway, people don't use eval, and so a quoted expression 
is almost never a program, deferred.   The exception is in
macros, which construct a program, which is then inserted into
a program (where it is evaluated). 
Then the context is the one in which the macro is expanded.
Most people do not define macros, but it seems you were
burned by this or the possibility of doing this..
RJF
 

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sympy.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/e62e4c43-add3-4334-a856-3a9c6ce2109d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to