operator for equations, was: Re: [Maxima] Plot options foo=bar vs [foo, bar]
Subject: operator for equations, was: Re: [Maxima] Plot options foo=bar vs [foo, bar]
From: Vadim V. Zhytnikov
Date: Mon, 12 Jun 2006 22:34:53 +0300
van Nek writes:
>
>> Other ideas -- plot2d (expr, x in interval(a, b)) ?
>> or plot2d (expr, x element_of interval(a, b)) ?
>> or plot2d (expr, x within interval(a, b)) ?
>> or plot2d (expr, a < x and x < b) ?
>
> My favourite is [x,a,b]. Maybe I am old fashioned in this case.
> Maybe, after looking for a lot of alternatives it turns out, that we already have the best.
>
After some consideration it seems that I agree with Volker.
All proposed version have two pleasant features.
1. A lot of typing
2. Style differs quite a bit from "usual" Maxima
notation
I only venture to suggest for consideration
yet another version. Replace
[foo,bar] by foo:bar
and
[foo,bar,baz,...] by foo:[bar,baz,...]
Rationale - make option name clearly visible
and save typing. Major part of plot options
have simplest form [foo,bar]. But essentially this
is (temporary) assignment. So list notation with
two braces is
a. Shadows real meaning of construction.
Why on earth we have to type list [foo,bar] while we
really mean "assign value bar to foo"?
b. Is boring to type. Damned closing brackets...
On the other hand maybe notation for plot range
should be kept in traditional form
[x,0,3]
since this is not assignment but notation for plot interval.
Compare to Mathematica's notation. They have
{x,0,5} for intervals and foo->bar for plot options
(temporary assignments). Maybe Mathematica's style
is not the best to follow but certainly there is some
logic behind it.
--
Vadim V. Zhytnikov
<vvzhy at mail.ru>
<vvzhy at netorn.ru>