On 6/9/06, Robert Dodier <robert.dodier at gmail.com> wrote:
> On 6/9/06, Stavros Macrakis <macrakis at gmail.com> wrote:
> 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.
Two problems there.
In my experience, the convenience factor of argument-quoting functions is
very quickly overtaken by their semantic clumsiness. As soon as you have an
argument-quoting function, someone has a good reason for introducing
variables inside it. Plot2d is no exception.
Secondly, even if the expression is quoted, I find it to be extremely poor
practice to overload an operator with two completely different meanings.
What's more, intervals in particular are generally useful objects, and it
would be a disaster to have a syntax for them that only worked in quoted
contexts (not to mention the problem with re-evaluation).
-s