3 ms·
> It’s not always clear from the perspective of the API user whether the difference is just the number of arguments or if there are other differences too. Optio
by tome 3y ago
> It’s not always clear from the perspective of the API user whether the difference is just the number of arguments or if there are other differences too. Optional arguments communicate that intention more explicitly.
They do, but potentially falsely.
> Looking at, e.g. the Python standard library a large number of functions have arguments that were added after the function was first defined. If Python didn’t have optional/keyword arguments then the number of API calls would be substantially larger.
The inability of Haskell not to have optional arguments isn't too bad, but all in all, I have to concede that you have a fair point. I personally don't miss optional arguments but I can see how they're beneficial (and I would really like named arguments).