Skip to content

Commit

Permalink
Add link to tc39#17
Browse files Browse the repository at this point in the history
Using just `tc39#17` works in issues, comments, and commits, but unfortunately this syntax doesn't auto-link in a README. This change makes the tc39#17 reference in the Syntax Sketch section explicitly link to issue 17.
  • Loading branch information
dotproto authored Jul 12, 2017
1 parent e9ea4c7 commit b7f100a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit b7f100a

Please sign in to comment.