Pattern matching?
Jordan Harband
ljharb at gmail.com
Fri Jun 30 16:35:06 UTC 2017
If it only does `===`, then it's not much better than switch.
It would be interesting to see a pattern matching proposal that was
extensible/customizable, perhaps via a well-known Symbol method.
On Fri, Jun 30, 2017 at 9:06 AM, Andreas Rossberg <rossberg at google.com>
wrote:
> On 30 June 2017 at 15:55, Henrik Sommerland <henrik.sommerland at gmail.com>
> wrote:
>
>> Why is there no support for pattern matching in JavaScript?
>> I would guess that it has been proposed before, and if so why hasn't it
>> been included?
>>
>> I have been thinking about it and I think it would integrate nicely into
>> JavaScript.
>> If it hasn't been proposed already I would propose it, and I would gladly
>> look into it more and try to examine what kind of semantics would be
>> suitable.
>>
>
> Long ago there was a proposal:
>
> https://web.archive.org/web/20111206195512/http://wiki.
> ecmascript.org/doku.php?id=strawman:pattern_matching
>
>
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20170630/51c54a04/attachment.html>
More information about the es-discuss
mailing list