natefaubion/matches.js

Rest expressions should have the ellipsis before the expression to mimic ES6

Closed this issue · 1 comments

Unlike coffee-script, rest expressions in ES6 have the ellipsis before the identifier (...x) instead of after (x...). Since this is a library primarily intended to be used with JS, maybe it should follow suit. Another advantage is that it makes parsing waaay simpler if we want to allow arbitrary expressions (not just identifiers) to be paired with "...".

For me personally its a good reason to follow a suit.