- Subject: Re: [slang-users] comparison operator grammar change
- From: Jörg Sommer <joerg@xxxxxxxxxxxx>
- Date: Mon, 23 Oct 2006 09:56:07 +0000 (UTC)
Hello John,
"John E. Davis" <davis@xxxxxxxxxxxxx> 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)
_______________________________________________
To unsubscribe, visit http://jedsoft.org/slang/mailinglists.html
[2006 date index]
[2006 thread index]
[Thread Prev] [Thread Next]
[Date Prev] [Date Next]