by Swizec · 14y ago · 0 comments
But I disagree with the part about small functions and the example being contrived because real world functions aren't small and you can't just get your output directly like that.
First of all, functions should be small. Anything you can unit test, you can put in this sort of instant feedback. It's basically just a unit test! Input goes in, output comes out. Without side-effects or other horrors.
Okay, so not all functions make sense to be unit tested. Sometimes you need an integration test and the function can't have direct output like that ... you have integration tests don't you? Why not just evolve the "Instant feedback" feature to being your set of tests?
I honestly don't care about much else in the LightTable demo. But I love the idea of instant feedback. Especially when working with Haskell or something.
It's about the instant feedback during development as opposed to the classic change/compile/reload cycle.
Especially for concepts it's important to understand the intention rather than picking on it point-by-point (which in itself, while true for the most part, seems rather pedantic to me).
Ultimately there will be code for which this feature is useful and code for which it is not. I can't say I wouldn't want it to be in my IDE's bag of tools though.