Hacker News new | ask | show | jobs
by misja 2458 days ago
The main benefit of example 2 IMO is that some variables got readable names. E.g. n became maxLineLength and x became line.

But bad naming practices have nothing to do with FP per se. Although it does seem to be fashionable in part of the FP community to have everything as terse as possible including variable names.

1 comments

To me, code with terse variables are much more readable since it's much easier to keep track of the variables when scanning the code. When I read that piece of code above, I didn't try to ascertain meaning from the variable names which, it's arguable whether I (or anyone) should or not since coders can assign variables arbitrary names.