3 ms·
Sure, one can make a new function. That's what I do, too, but then I end up greatly missing function overloading. In the example's case I might end up making a
by mrj 2y ago
Sure, one can make a new function. That's what I do, too, but then I end up greatly missing function overloading. In the example's case I might end up making a ReplaceAll function. It creates namespace clutter.
Function overloading could easily handle context with and without arguments.
- enneff 2y agoI think if there are a lot of functions (or a function with a lot of arguments, common to python) you have clutter regardless. I would rather have a bunch of different names than a bunch of different functions with the same name. Having to choose names for each of the functions is a gentle push back asking “do you really need all these flavours of function or are you abstracting this in the wrong way?”