3 ms·
People have already pointed out using pure functions for the heavy lifting and then making the IO as simple as possible, but another issue is tooling. If you ha
by madhadron 6y ago
People have already pointed out using pure functions for the heavy lifting and then making the IO as simple as possible, but another issue is tooling. If you have something like Standard ML's module system or COM style components, you define a functor/interface/contract that your code depends on, and then implement a test form and a production form.
This is basically what dependency injection is doing, but working around the fact that modular programming didn't really catch on.