Plot options foo=bar vs [foo, bar]



On 6/9/06, Robert Dodier <robert.dodier at gmail.com> wrote:
>
> http://maxima.sourceforge.net/wiki/index.php/New%20Version%20of%20Openmath
> I see you suggest changing the way to specify plot options, e.g.,
>
>   plot2d(f(x), x=a:b, plot_format=openmath)
>
> I'm in favor of this.


I like the idea of using "=" to specify options, and I like the idea of an
interval operator.  Once we have something like x=<<a,b>> for intervals, we
naturally expect x=[1,2,3] or x=set(1,2,3) to work as well, which is nice.

However, ":" is not a good choice for the interval operator, as it is
already defined as the assignment operator, so "x=a:b" will set a to be and
evaluate to "x=a".

In fact I think that for options which are now
> specified as [foo, bar] it is only necessary to replace the test for MLIST
> with a test for
> MEQUAL; I believe option values are always accessed via CADDR or NTH
> and that works whether the expression is [ or = .
>
> Or we could omit the test for MLIST or MEQUAL entirely and then the
> code would work for both.
>

Why would this be a good idea?  Do you really want plot2d(x,x^<<2,3>>) to be
synonymous with plot2d(x,x=<<2,3>>)?

          -s