2 ms·
The "True Way" of using Haskell involves getting the type system to work for you. It is true that as your project scope changes in surprising ways, occasionall
by dllthomas 12y ago
The "True Way" of using Haskell involves getting the type system to work for you.
It is true that as your project scope changes in surprising ways, occasionally you'll discover you need some facility somewhere that the types don't currently make it available. Yes, you've got to go through and re-plumb things - but your compiler will quickly point you at everything that needs to change to that end. As michaelochurch says, keep everything small and composable - and I would add "abstract", with some caveats - and much of it will shift automatically where it's safe to do so.
Edited to add:
Regarding the "update the types so that I can do something I couldn't" issue - it's not really any different than writing any language and discovering that you need some information you don't have handy. Threading it through the various function calls is not hard and usually the right thing to do. "I can do anything anywhere" is the equivalent of making it a global.