Hi! I didn't understand your reply.
I think currently it would raise an error, because 1 < 2 < 3 is currently saying (probably) true < 3. But a "new" syntax could possibly parse that as a "chain" of comparisons. Would this be acceptable to introduce into JavaScript (just curious)? I've probably missed your point entirely, because I saw a short message "3 < 2 < 1 //true", and I've assumed you meant it in reverse. On Sat, 1 Feb 2020 at 23:12, Mark S. Miller <[email protected]> wrote: > 3 < 2 < 1; // true > > > On Sat, Feb 1, 2020 at 3:03 AM Naveen Chawla <[email protected]> > wrote: > >> Certain languages allow the expression 0<x<5. Does anybody know if this >> would be syntactically possible in JavaScript? Of course this would only >> apply for "if"/"while" statements. >> >> On Fri, 31 Jan 2020 at 22:41, Isiah Meadows <[email protected]> >> wrote: >> >>> Still better to discuss it there - it's highly related to your >>> suggestion. And I'm pretty sure an issue already exists related to that. >>> >>> On Fri, Jan 31, 2020 at 09:06 Sultan <[email protected]> wrote: >>> >>>> The pattern matching proposal does not handles the mentioned case: >>>> >>>> switch(type) { case 0...5: } being the equivalent of switch(type) { >>>> case 0: case 1: case 2: case 3: case 4: case 5: } >>>> >>>> On Fri, Jan 31, 2020 at 7:36 PM Bruno Macabeus < >>>> [email protected]> wrote: >>>> >>>>> I agree with Oriol. >>>>> We already have the proposal pattern matching, that has a very similar >>>>> effect. >>>>> I think that is better to improve pattern matching proposal in order >>>>> to be able to match using ranges (or at least check if it's good to do) >>>>> instead of create a new proposal. >>>>> >>>>> On Fri, 31 Jan 2020 at 14:08, Oriol _ <[email protected]> >>>>> wrote: >>>>> >>>>>> This sounds like https://github.com/tc39/proposal-pattern-matching >>>>>> >>>>>> El 31/1/20 a les 10:57, Sultan ha escrit: >>>>>> >>>>>> For example, the following: >>>>>> >>>>>> switch (value) { >>>>>> case 0...9: break >>>>>> case 'a'...'z': break >>>>>> } >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> es-discuss mailing >>>>>> [email protected]https://mail.mozilla.org/listinfo/es-discuss >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> es-discuss mailing list >>>>>> [email protected] >>>>>> https://mail.mozilla.org/listinfo/es-discuss >>>>>> >>>>> _______________________________________________ >>>>> es-discuss mailing list >>>>> [email protected] >>>>> https://mail.mozilla.org/listinfo/es-discuss >>>>> >>>> _______________________________________________ >>>> es-discuss mailing list >>>> [email protected] >>>> https://mail.mozilla.org/listinfo/es-discuss >>>> >>> -- >>> ----- >>> >>> Isiah Meadows >>> [email protected] >>> www.isiahmeadows.com >>> _______________________________________________ >>> es-discuss mailing list >>> [email protected] >>> https://mail.mozilla.org/listinfo/es-discuss >>> >> _______________________________________________ >> es-discuss mailing list >> [email protected] >> https://mail.mozilla.org/listinfo/es-discuss >> > > > -- > Cheers, > --MarkM >
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

