DEV Community

Discussion on: The Trials and Tribulations. A Fool's Guide To Writing Functional JS (Part 4)

Collapse
 
pentacular profile image
Info Comment hidden by post author - thread only visible in this permalink
pentacular

Or you could just ... use variables.

Then you can also have sensible names.

And it won't be any less functional.

Collapse
 
fa7ad profile image
Fahad Hossain • Edited

Sure, I never said you couldn't use variables. Which of the problems do you think can be solved by using variables? I never said anything about having sensible names, are you confusing this post with some other post?

Collapse
 
pentacular profile image
pentacular

Since you're suggesting point-free composition it might be a good idea to also consider the alternative.

const deduplicated = deduplicate(data);
const inverted = invert(deduplicated);
...

Each approach has its strengths and weaknesses, after all.

Some comments have been hidden by the post's author - find out more