[slang-users] comparison operator grammar change
Jörg Sommer
joerg at alea.gnuu.de
Mon Oct 23 05:56:07 EDT 2006
Hello John,
"John E. Davis" <davis at space.mit.edu> wrote:
> For slang-2.1, I am thinking about making a change to the part of the
> grammar that deals with the four comparison operators <, <=, >, >=.
> In particular, I would like for boolean expressions such as
>
> a < b <= c
>
> to mean
>
> ((a < b) and (b <= c)).
A really interesting idea. I don't know other programming language that
supports such a syntax, although it is a common notation in mathematics.
> Unfortunately, such a change would break backward-compatibility.
> Currently, a<b<=c is a valid expression and is equivalent to (a<b)<=c.
> My feeling is that usage of such constructs is extremely rare
ACK.
> Any thoughts on this matter?
I think it would be a nice feature.
Bye, Jörg.
--
Ein Optimist ist in der Regel ein Zeitgenosse, der ungenuegend informiert ist.
(John B. Priestley)
More information about the slang-users-l
mailing list