2 ms·
Over the past couple of years I've become proficient with haskell and can throw out an arbitrary program with it about as easily as I could with Python, which I
by alephu5 6y ago
Over the past couple of years I've become proficient with haskell and can throw out an arbitrary program with it about as easily as I could with Python, which I have 10 years of experience with. I've built and worked on large real-world projects for both, and I've noticed something quite interesting at the threshold of when it becomes too complex to comprehend how all the logic interacts. With python I feel a mild panic, because I know that all I have are tests and human QA covering a rapidly shrinking fraction of possible use-cases. Adding features beyond this point can sometimes feel like groping in the dark, perhaps with a debugger serving as a candlelight.
On the other hand with haskell, I know that most functions I write are completely deterministic, and will never have runtime exceptions regardless of how complex the compositions are. I can engineer my application to contain perilous code in a well-defined minority of functions and use rigorous testing to make sure they're right. There are many other excellent safety features, but these in particular give me a huge peace of mind.
In summary python excels when you need to do a simple high-level tasks like send an email or run a small REST API, but the development rate falls sharply when the logic and state is deeply composed. In contrast Haskell with its static-types, immutability, terseness and emphasis on safety (in both the language and library ecosystem), lets you maintain development velocity far beyond.