5 ms·
I know there's much bigger things in this release to be excited about, but I'm so happy they're allowing trailing commas in function args/params.
by elzi 9y ago
I know there's much bigger things in this release to be excited about, but I'm so happy they're allowing trailing commas in function args/params.
- koolba 9y agoCurious why? I get the usefulness for arrays and object declarations. Particular to have cleaner diffs. But why for function calls?
- t1amat 9y agoPrettifying long function signatures and calls. You can spread them across multiple lines with the same trailing comma syntax you might use with a multiline array or object literal.
- epidemian 9y ago> Particular to have cleaner diffs. But why for function calls? Exactly the same reason :)
- koolba 9y agoI suppose but that's usually an indication that an object would be more apt. If you have enough parameters that it needs to be wrapped, they're probably hard to track too.
- hajile 9y agoI like it for `compose()` function calls. Changing the parameters and order is fairly common, so the trailing comma becomes convenient for moving and adding parameters.
- yzmtf2008 9y agoOne small benefit is that it's now easier to generate code.