2 ms·
That kind of summarizes what I like about Haskell. The types of every value and function are so informative, and the definitions, even in third-party libraries,
by jolmg 8y ago
That kind of summarizes what I like about Haskell. The types of every value and function are so informative, and the definitions, even in third-party libraries, are often so short and to-the-point that surprises are very minimal even when working a library that I've never used before. The avoidance of code with side-effects also helps a lot, since it means that for most functions I only care about what goes in and what comes out of the function.
This also carries to frameworks. Web frameworks like Ember and Rails rely very much on side effects, especially Ember. I don't even know how a rendered template is updated when updating a controller property. It just works automagically! Defining an app in frameworks like this is a lot of defining hooks that get called by the framework environment. Trouble then happens when it calls it when you didn't expect it or when it doesn't when you did expect it.
Haskell's Yesod, on the other hand, has been a pleasure to work with. If something's calling my code, the caller is going to be in my repo. I get control all the way to the final executable's main function. Yesod's code is there only as support for me to call.