4 ms·
I use it like es6 or haskell destructuring. Sure it's a little weak compared to both those implementations, but the tuple case covers enough to be useful.
by mycelium 11y ago
I use it like es6 or haskell destructuring. Sure it's a little weak compared to both those implementations, but the tuple case covers enough to be useful.
- pyre 11y agoEC6 allows you to destructure in the function definition?
- mycelium 11y agoYep. It's awesome. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment#Function_argument_defaults https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...
- emidln 11y agoAs someone who splits his time between Python, Clojure, and Javascript (via Babel), lack of this is extremely annoying for Python since the other two languages allow it.