Plot options foo=bar vs [foo, bar]



On 6/9/06, Stavros Macrakis <macrakis at gmail.com> wrote:

> 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.

It might also be useful to be able to specify a step as well as the endpoints.

> 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".

There is the possibility that plot2d / plot3d would be argument-quoting
functions so that syntax like x=a:b would be evaluated in some
manner other than the default.

>> 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>>)?

Well, not really. Allowing MLIST to work in place of MEQUAL
would just be for backward compatibility. I don't think that's
very important, and it would make a mess, so maybe we can
just drop that idea.

Robert