3 ms·
I am a fan, but you're right, it can get awkward. The good part is the set of pure functions that take input and compute something from it. But the awkward pa
by charlieflowers 8y ago
I am a fan, but you're right, it can get awkward.
The good part is the set of pure functions that take input and compute something from it.
But the awkward part (assuming you're coding in a typical mainstream imperative language) is the "transaction script" that gets an input, passes it to the pure functions, and then takes the result and writes it out. If there's no event loop and you're not using promises or something like that, it forces an awkward boundary right down the middle of your code that just feels unnatural.
Still, I think it's worth it for many problems. The vast majority of your code is pure functions -- simple, understandable, testable. The price you pay is this unnatural seam at each point of IO.