syntax for case ranges

Isiah Meadows contact at isiahmeadows.com
Fri Jan 31 17:11:30 UTC 2020


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 <thysultan at gmail.com> 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 <bruno.macabeus at gmail.com>
> 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 _ <oriol-bugzilla at hotmail.com> 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 listes-discuss at mozilla.orghttps://mail.mozilla.org/listinfo/es-discuss
>>>
>>>
>>> _______________________________________________
>>> es-discuss mailing list
>>> es-discuss at mozilla.org
>>> https://mail.mozilla.org/listinfo/es-discuss
>>>
>> _______________________________________________
>> es-discuss mailing list
>> es-discuss at mozilla.org
>> https://mail.mozilla.org/listinfo/es-discuss
>>
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
>
-- 
-----

Isiah Meadows
contact at isiahmeadows.com
www.isiahmeadows.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20200131/ba8c84fa/attachment.html>


More information about the es-discuss mailing list