|
In addition, the same notation is often overloaded in new domains, where the association with the prior domain is metaphorical, or even simply allegorical. As a novice programmer, it took years to get out of the habit of using non-descriptive single-letter variable and function names. It’s a terrible habit, and makes code incomprehensible — and programmers know it. Math, as taught to kids, is full of single-letter variable names (or worse, as you point out, using non-Roman letters and other symbols) that are devoid of any hints to the uninitiated of what their meaning might be. I wonder what it would be like if math were taught with descriptive names — starting with the basics, for functions and variables, and used those names consistently. Would it be more verbose? Absolutely — but I’m pretty sure it would also be a huge kindness to learners. |
Note that if you programmed in FP languages, you'd have to unlearn the "descriptive variable names" thing you were taught. Once you deal with abstractions, names cease to be meaningful. 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. Some very good programmers argue that long/descriptive names often obscure the shape of an abstraction.