On Fri, May 17, 2013 at 06:04:16PM -0400, John W. Eaton wrote:
For Octave, we have to decide what to do for the operators that are
unique to Octave. That includes all op= assignment operators, ++, and
--. Since Matlab does not have --,
foo --
will be a command. But for Octave, that could be a decrement
operation.
The -- argument is used by some command line tools as a separator of
options and arguments, e.g. from 'info rm':
rm -- -f
For op= assignment operator this reasoning makes less sense. And having
inconsistent behavior between op=, --, and ++ seems like a bad idea.
I think most importantly we should keep consistency between those three
at least. I can see arguments both for and against interpreting these
examples as commands:
rm -- -f
git-checkout --
x -= 5;
x ++;
I'd tend towards interpreting all of these as operators (with a syntax
error in the first example), since Octave is foremost a tool for numeric
computation and not a shell.