2 ms·
> IMHO, the solution to high cognitive load, given a high enough reward, is just persistent, methodical execution towards learning. It will never converge towa
by nurettin 7y ago
> IMHO, the solution to high cognitive load, given a high enough reward, is just persistent, methodical execution towards learning.
It will never converge towards being easy to handle. The load doesn't come from being inexperienced, it comes from keeping the big picture in your head (all your types and their interactions) instead of iterative thinking.
- whateveracct 7y agothis isn't true - at least not in my years of professional experience I barely keep anything in my head most of the time when programming in haskell. It's kind of related to the "emphasis on structure" point from the article. All of a type's "interactions" are just functions. There aren't any second-order things to consider due to referential transparency.
- hopia 7y agoI agree, type signatures & inference and referential transparency offload the cognitive load from your head to the compiler/IDE. Functions that actually work on the data structures are generally guaranteed to be able to work on the said data. This way you don't need to constantly be mindful of what the data looks like, the compiler does that for you.
- anchpop 7y agoThis exactly. Although the effect is much greater if you turn on some complier warnings (like -fwarn-incomplete-patterns). The emphasis on coming up with types that contain the guarantees you need makes it so once it compiles, you don't have to remember what guarantees you need to have. Although doing that is not nearly as convenient in Haskell as it could be (types often don't compose well, and you need to add strictness annotations here and there to prevent `undefined`), it is actually possible which is a big step up from languages where you can't even try like C or Python.