On Tue, 30 Jan 2007, Allin Cottrell wrote:
On Tue, 30 Jan 2007, Riccardo (Jack) Lucchetti wrote:
> On Tue, January 30, 2007 23:11, Allin Cottrell wrote:
>
>> That does make sense, but I'm a bit reluctant to change the
>> meaning of logical "&" and "|" right now -- though we
could do
>> that later with fair warning.
>
> What we could do is: introduce now "&&" and "||" as
synonyms of "&" and
> "|" but issue a warning everytime the 1-char versions are found,
> notifying users that they are deprecated (big red letters, fire alarm,
> buzzers, flashing lights, whatever). In a year's time or so, introduce
> "|".
One more take on this (still trying to square the circle here!).
It strikes me that logical OR as applied to matrices, is, while
potentially meaningful, quite arcane. I'd be surprised if there
are any gretl scripts in circulation that involve OR'ing matrices.
So, could we perhaps do this (as Jack suggests, with one
amendment):
* Amend the gretl manual to make "&&" and "||" the preferred
forms
of logical AND and OR.
* Continue to support "&" as AND and "|" as OR for the near
future, but with a "deprecation" message...
* ...with the exception that "A|B" in matrix-generating
expressions means vertical concatenation (and if you really want
to OR matrices you must use the new "||" form).
I'm not pushing this idea all that hard, just wondering. It
carries some potential for confusion. The main problem I see is
identifying a "matrix-generating expression" for the purpose of
interpreting "|". My notion is that this would be the right-hand
side of a "matrix M = ..." command, or the right-hand side of
commands on the pattern
genr M = ...
M = ...
where "M" can be identified as a pre-existing matrix.
Allin.