Nice article! For me, unaries (functions that only take a single argument) are the way to go. Need more parameters? Use currying, tuples or objects depending on your needs. If you really think about it, functions with more than 1 argument are generally a nightmare because we have concerns such as:
Is the order of the arguments correct?
What happens if we need to change that order?
What happens if we need more arguments?
These problems are all resolved if we only use a single argument every time.
Cheers!
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Nice article! For me, unaries (functions that only take a single argument) are the way to go. Need more parameters? Use currying, tuples or objects depending on your needs. If you really think about it, functions with more than 1 argument are generally a nightmare because we have concerns such as:
These problems are all resolved if we only use a single argument every time.
Cheers!