> Hmmm... These are much like LISP's QUOTE
Yes, Maxima '(...) is exactly like Lisp (quote ...). But do keep in
mind that Maxima has simplification in addition to evaluation. So:
'( 2+3 ) => 5 (simplification)
(quote (+ 2 3)) => (+ 2 3) (Lisp has no simplification
> '( ''v ) ---> ... I can't give a counterpart in LISP, can you?
> it means (QUOTE vv1). Maybe just v in LISP
> is the counterpart.
As for '', you say:
> ''v ---> (EVAL v)
>
> ''(''v) ---> (EVAL (EVAL v))
No. Common Lisp's #.(...) corresponds to Maxima's ''(...).
(setq v 'v1 v1 'vv1 vv1 'vvv1)
(list v '#.v #.v #.#.v) => (V1 V1 VV1 VVV1)
(list 'v v '#.v #.v #.#.v) => (V V1 V1 VV1 VVV1)
(list (setq v 'v2 v2 'vv2 vv2 'vvv2) (list 'v v '#.v #.v #.#.v)) =>
(VVV2 (VVV2 (V V2 V1 VV1 VVV1)))
I don't know if Scheme supports something similar.
> Can you give me some more information on the semantics of '
> and ''? What evaluation order are they using?
Um, I think I already did. '' happens at the time the expression is
*read*, not the time it is evaluated, just like #. in Lisp:
Maxima:
readonly();
v
=> v
readonly();
''v
=> v1
Common Lisp (GCL):
(read)
v
=> v
(read)
#.v
=> v1
-----------
By the way, I agree with RJF that EV and '' are both rather specialized
mechanisms, and substitution is usually what you want. These examples
are supposed to demonstrate the detailed semantics of ', '', and ev;
they are NOT supposed to be good usage examples.
-s