prederror, conditionals



> The notation If[test, a, b, c] is unclear and I'm opposed to  
> imitating it.
>
> All the best
>
> Robert Dodier

Functional seems nicer and shorter to me...

I think Maxima's 'if' is wrong - in a sense, if should evaluate ONLY  
when the result of the test is known.

For instance

b:4
(%i5) if a then b else c;
(%o5) if a then 4 else c

I think it should return b unevaluated until of course 'a' is known.

I find lisp's if very nice precisely because it's written as a  
function - though 'if' is no ordinary function, except in Maxima,  
where in simplifies 'then' and 'else'. Usually in real programming  
languages, 'if' guarantees that only one of the two ('then', 'else')  
will be looked at. For Maxima, 'if' is a normal function with special  
syntax (totally unnecessary) which evaluates it's arguments.

Perhaps, 'if' shouldn't simplify 'then' and 'else' statements unless  
told so (double quote)?

Regards,
Ziga