Am 01.12.2014 um 23:25 schrieb Richard Fateman:
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.
IIRC early Lisps used the new ones (Interlisp certainly did, it made my
code somewhat brittle and me quite unhappy).
If memory serves me right, Scheme took one decision and CL the other.
To the language design community, it's not a thorny question anymore,
the consensus there is that it should be the original environment. And
that you shouldn't use a lexical approach such as quoting anyway.
I agree with that stance, but then no language can redo its design at
such a core level. (That's why I'm so cautious about taking designs from
Lisp: IMO, macros are not the way to go for other languages, and
macro-based designs might be more dependent on that concept than its
users and proponents are aware.)
Anyway, people don't use eval, and so a quoted expression
is almost never a program, deferred.
Ah. I wasn't aware of this.
Though I can see how attractive anything would be if your main
metaprogramming tool is quote&eval, so I now understand why macros are
so important.
> 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..
Not by macros, Interlisp didn't have these :-)
But certainly by quote&eval.
Regards,
Jo
--
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 sympy+unsubscr...@googlegroups.com.
To post to this group, send email to sympy@googlegroups.com.
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/547D67CE.50408%40durchholz.org.
For more options, visit https://groups.google.com/d/optout.