For those of you still wanting to follow the current state of things, check
out the proposal's repo [1], and the issue tracking my alternate proposal
[2].

[1]: https://github.com/tc39/proposal-pattern-matching
[2]: https://github.com/tc39/proposal-pattern-matching/issues/17

-----

Isiah Meadows
[email protected]

Looking for web consulting? Or a new website?
Send me an email and we can get started.
www.isiahmeadows.com

On Mon, Jul 3, 2017 at 9:03 AM, Alex Deas <[email protected]> wrote:

> I like pattern matching but don't think it would work well for ES,
> although I'd love to see a proposal that proves me wrong. My main concerns
> would be:
>
>    - What are you matching on? Constructor, `instanceof`, duck typing,
>    prototype etc
>    - What happens when one type can be coerced to another.
>    - What happens in the case that the matching identifier doesn't exist?
>    - such as with `Object.create(null, {})`
>
> Alex
>
>
> -----Original message-----
> *From:* Sebastian Malton
> *Sent:* Monday, July 3 2017, 12:44 pm
> *To:* Henrik Sommerland; es-discuss
> *Subject:* Re: Pattern matching?
>
> Are you thinking kind of like Rust's match statement? I think that
> something like that would be quite a good addition.
>
> Sebastian
>
> *From:* [email protected]
> *Sent:* June 30, 2017 9:55 AM
> *To:* [email protected]
> *Subject:* Pattern matching?
>
> 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.
>
> Peace!
> --
> Henrik "TheGrandmother" Sommerland
>
> _______________________________________________
>
> 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

Reply via email to