Problems with EV



Here's some more bizarreness in EV I ran across while working on something
else (not EV).... Perhaps I should start a Wiki page on EV to document
it....

Quotes and noeval are hard to understand.

A  block([x:9], 'x)          => 'x    OK
B  'x, x=9                   => 9     Hey, why ignore the quote?
C  'x,x=9,noeval             => 9     ... even with noeval ??

Functions are treated differently from variables

D  f(x),f(y):=y^2            => x^2   OK
E  '(f(x)),f(y):=y^2         => x^2   Just like B
F  '(f(x)),f(y):=y^2,noeval  => f(x)  Not like C, which would give
(lambda([y],y^2))(x)
G  '(f(x)),f=lambda([y],y^2) => x^2   Like C, not like F

Let's look at this more systematically:

H [ x,    '(x),    '('(x))   ], x=9            => [9, 9,  x]
I [ x,    '(x),    '('(x))   ], x=9,    noeval => [9, 9, '9] ??? H gives x,
but noeval gives '9?

Subscripted variables are treated differently:

J [ x[1], '(x[1]), '('(x[1]))], x[1]=9         => [9, 9,  9] Inconsistent
with H
K [ x[1], '(x[1]), '('(x[1]))], x[1]=9, noeval => [9, 9, '9] Consistent with
I

Noeval changes the meaning of clause order:

L x,x=y,y=z        => y         OK
M x,y=z,x=y        => y         OK
N x,x=y,y=z,noeval => z         ??? What does noeval have to do with order?
O x,y=z,x=y,noeval => y         OK

And there's more....

P h(x),x=5,h(q):=x+q^3                  => 130
Q h(x),h(1):h1,x=5,h(q):=x+q^3          => 130
R h(x),h(0):h0,x=5,h(q):=x+q^3          => h0^3+5  ???!!!
S h(x),h(0):h0,x=5,h(q):=x+q^3,noeval   => h(h0)   ???!!!

T g[x],x=5,g[q]:=x+q^3                  => 130
U g[x],g[1]:g1,x=5,g[q]:=x+q^3          => x + 125
V g[x],g[0]:g0,x=5,g[q]:=x+q^3          => g0^3+5  ???!!!
W g[x],g[0]:g0,x=5,g[q]:=x+q^3,noeval   => g[g0] ???!!!

Is this behavior that any sane user will find intelligible, consistent, and
sensible?

       -s