3 ms·
The "curried" code seems less readable and maintainable than the original code. Is this like dependency injection where I have to make my code harder to read an
by Finster 12y ago
The "curried" code seems less readable and maintainable than the original code. Is this like dependency injection where I have to make my code harder to read and maintain to satisfy some technical definition of "loosely" couple?
- aResponder23 12y agoIt'll seem less readable at first, yes. I've seen a codebase transformed by currying. We were able to remove six functions from one webservice interaction service, and handfuls throughout other parts of the code, and have made debugging and maintenance easier. The code is a little more confusing at first glance. The developers who replaced the code with curried functions didn't inform the whole team what they were doing. There were a lot of wtfs until they clarified. Now we can read it, and I know I'll be looking for places for partial applications.