43 ms·
Having curried functions doesn't preclude default parameters entirely, but it requires that you signal somehow that you're not going to be giving it anything el
by hiptobecubic 5y ago
Having curried functions doesn't preclude default parameters entirely, but it requires that you signal somehow that you're not going to be giving it anything else at the call site.
A sentinel value could work, or even just passing all the args together as a tuple. Haskell and js frequently do the latter.
- brundolf 5y agoStill, I think requiring any sort of special calling convention across the language would stray too far from the “JS comfort zone” that I’m aiming for. Especially when it’s for the sake of a feature that was only ever a “nice to have”
- hiptobecubic 5y agoAgreed, it is probably not worth it if you want to stay close to js. Sad though, it's a great feature.