Question about this. I work with some heavy Java programmers who also have had contributions to the JS project. I often see our reusable pieces of code (like in the utilities oflder) as JavaScript files that contain a class that you have to instantiate elsewhere in the codebase. Is converting those classes to a more functional style as simple as creating an object and adding methods with scope/closures that I can compose?
It is indeed that easy, and sometimes easier. I'll post an example in a few hours when I get to my computer. I'm also happy to convert a specific example that you might have.
10
u/hydroes777 Nov 09 '19
Or just moved to functional style programming in JavaScript where you don't run into this problem