3 ms·
I'm generally a fan of currying, but specifically when used with javascript, I think it can be problematic. The default behaviour of any function when called wi
by anon4 12y ago
I'm generally a fan of currying, but specifically when used with javascript, I think it can be problematic. The default behaviour of any function when called with fewer arguments than specified is to set named arguments to undefined. Meaning, functions in javascript always take any number of arguments and changing that default behaviour is confusing. There is also the matter of the "this" parameter.
I think that using the .bind() method on functions is the right approach. It will lead to less surprising behaviour in the context of javascript.