If then else and unevaluated conditionals



> For better or worse, Maxima doesn't make a clear distinction between
> language and data (and for my part, I don't want it to make that distinction).
> Code = data is of course inherited from Lisp, and, while we're not obliged

Here I agree with you Robert -- being able to manipulate expressions
as programs and programs as expressions is useful and powerful in
Maxima -- and in fact I think we've only scratched the surface of the
possibilities.  It works quite smoothly for side-effect-free
mathematical expressions, but once you have side-effects and errors,
things get messier.  For example, consider

          x : if a>0 then 1 else 0

You can conclude that x has a value after this statement is executed,
and that the value is either 1, 0, or (with unevaluated conditionals)
a conditional expression.

However, if the assignment is moved inside the conditional::

          if a>0 then x:1 else x:0

then you *cannot* conclude that x has a value after the execution of
this statement.

The calculus of side-effects is messy....

               -s