8 ms·
> If the most you can say about a parameter to a higher order function is that it is "a function", then "f" is the best name for it Of course. But even in FP l
by zamfi 6y ago
> If the most you can say about a parameter to a higher order function is that it is "a function", then "f" is the best name for it
Of course. But even in FP languages you don’t name all your functions “f”! At some level of abstraction, sure, you use “i” for index variables, etc., but once you back out of that low level, you are going to be naming things that are less abstract.
- the_af 6y agoAgreed. I'd say Math is a lot like the abstract parts of FP, and so short variable names make sense there, just like they do in higher order FP functions. Choosing "more descriptive" names risks locking you into a specific metaphor and prevents you from seeing the big picture, which seems doubly dangerous in Math.