From b7f100a3abe3c6a781e719eff9aa4270d64d1864 Mon Sep 17 00:00:00 2001 From: Simeon Vincent Date: Wed, 12 Jul 2017 08:21:42 -0700 Subject: [PATCH] Add link to #17 Using just `#17` works in issues, comments, and commits, but unfortunately this syntax doesn't auto-link in a README. This change makes the #17 reference in the Syntax Sketch section explicitly link to issue 17. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d13a277..32a35cb 100644 --- a/README.md +++ b/README.md @@ -59,7 +59,7 @@ LiteralMatchPattern : // number, string, boolean, null, or undefined literal ``` -The syntax of object and array patterns deliberately hews closely to destructuring which is advantageous for a couple reasons. First, it aligns with existing syntax that developers are familiar with. Second, it allows pattern matching and destructuring to be used in similar contexts (for example, future proposals for multi-methods or the like). However, pattern matching JavaScript values requires in practice requires more expressive power than simple destructuring gives us. This proposal adds additional patterns to fill the gaps. It may be reasonable to depart further from destructuring to increase the utility and expressiveness of this proposal (e.g. something like #17). +The syntax of object and array patterns deliberately hews closely to destructuring which is advantageous for a couple reasons. First, it aligns with existing syntax that developers are familiar with. Second, it allows pattern matching and destructuring to be used in similar contexts (for example, future proposals for multi-methods or the like). However, pattern matching JavaScript values requires in practice requires more expressive power than simple destructuring gives us. This proposal adds additional patterns to fill the gaps. It may be reasonable to depart further from destructuring to increase the utility and expressiveness of this proposal (e.g. something like [#17](https://github.com/tc39/proposal-pattern-matching/issues/17)). ## Object Patterns Object patterns match objects with certain properties. Additional properties may be present on the matched object. Examples: