Here's a proposal for JavaScript that seems to be going through standardization: https://github.com/tc39/proposal-pattern-matching
Here's the end of an older python-ideas thread: https://mail.python.org/archives/search?mlist=python-ideas%40python.org&q=pattern+matching+reprise On Tue, Dec 31, 2019 at 9:35 PM Guido van Rossum <gu...@python.org> wrote: > There were match proposals in the past — have you looked those up? Maybe > they solve your problem without that syntax — or maybe they would benefit > from it. > > On Tue, Dec 31, 2019 at 19:20 Andrew Barnert via Python-ideas < > python-ideas@python.org> wrote: > >> Let me make this bit a little clearer: >> >> > On Dec 31, 2019, at 17:54, David Mertz <me...@gnosis.cx> wrote: >> > >> > So your syntax gets me maybe 20% of what I'd want to do if we had >> pattern matching. >> >> I’m not proposing either of these changes in its own, because I don’t >> have any use for either one on its own. (Or for unpacking in walrus >> assignment, which I forgot to mention in the initial email, but Alexander >> reminded me of it.) >> >> I’m just feeling out whether either one is so horrible that any larger >> proposal (which I don’t have in anywhere near ready-to-share form yet) >> would have to be rejected on that basis. (Which I think is a serious >> possibility. Something about if-try still smells weird to me in a way I >> haven’t figured out yet.) >> >> _______________________________________________ >> Python-ideas mailing list -- python-ideas@python.org >> To unsubscribe send an email to python-ideas-le...@python.org >> https://mail.python.org/mailman3/lists/python-ideas.python.org/ >> Message archived at >> https://mail.python.org/archives/list/python-ideas@python.org/message/JHR55HOBZW35QFAAGBFOFCMQ6JWWPJXR/ >> Code of Conduct: http://python.org/psf/codeofconduct/ >> > -- > --Guido (mobile) > -- --Guido van Rossum (python.org/~guido) *Pronouns: he/him **(why is my pronoun here?)* <http://feministing.com/2015/02/03/how-using-they-as-a-singular-pronoun-can-change-the-world/>
_______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/BCLMCEGDTM3FFKAL5X4LXSBWK65FN4LJ/ Code of Conduct: http://python.org/psf/codeofconduct/