On Fri, Aug 16, 2013 at 12:38 PM, Kevin Smith <[email protected]> wrote:
> > > Do you not think that it would be awkward to have the exact same pattern >>> syntax for these two cases (matching and destructuring), but with different >>> semantics? >>> >>> >> Yes, I don't think so. >> > > Hmmm... Let me rephrase. It would be awkward and confusing to have > divergent semantics for the same pattern syntax in destructuring and > matching. > > This is again if we need strict matching. As long as JS is assignment-base language with mutable state and that foo.nonExisting === undefined today, I think the destructuring w/o throwing should be the main course. And if you want the strict match, it can be an extension. If we need it. If we have use-cases. This match(...) is just an idea, of course it should be worked on. Dmitry
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

