let call1 arg = ...
let call2 arg = ...
let error_handler call arg = ...
let call1 = error_handler call1
let call2 = error_handler call2
Python made this kind of technique famous, but languages with generics can do it pretty well too.But some people like offloading that to the language: not having it in a language means you don’t have to control for it on your team/project contributors + some 3rd party library.
I felt Go filled this minimalist category well. It’s always nice having a modern mainstream option doing so, not just a niche one on the fringes (ala LISP), even if I’m not personally a fan.
I guess it’s hard to keep saying no.
At the end of the day, whatever gets the product built is what matters. I just fail to see how generics could be a hindrance.
Confessions of a used programming language salesman
https://dl.acm.org/doi/10.1145/1297027.1297078
> As a result, functional programming has finally reached the masses, except that it is called Visual Basic 9 instead of Haskell 98.
Also higher-order functions are a moot point. Higher-order functions give you convenience, but no increase in expressive power (defunctionalization is an homomorphism).
Of course, generics give you a true increase in power.