5 ms·
Don't confuse new terminology with math. Programming has lots of terminology, and some of it is backed by mathematically rigorous definitions, but that doesn't
by cschneid 11y ago
Don't confuse new terminology with math. Programming has lots of terminology, and some of it is backed by mathematically rigorous definitions, but that doesn't require you to know that in order to use them.
OO has 'Inheritance', 'Subclassing', 'SOLID', 'Liskov', every design pattern name, 'Object', 'Class', 'Overloading', 'Factory', etc, etc.
Haskell has similar words, covering both core concepts, and common patterns of implementation. 'Monoid', 'Monad', 'State', 'Reader', 'Function', 'Lambda', 'Typeclass' are all examples of terminology in Haskell
None of those words are inherently more difficult than the OO ones, you're just not familiar with them.
The best way to learn Haskell is to follow along with a course that has you do exercises, and actually do the exercises. See the https://github.com/bitemyapp/learnhaskell https://github.com/bitemyapp/learnhaskell course for some class recommendations.
- commentzorro 11y agoNot just terminology. It's more like there's only two levels of Haskell: first it's understandable and I say, "Okay just step by step and I got this. Then all of a sudden we run smack into something like this big wall of WFT: * The infix application function (ma>>=\a->f(a)), commonly called bind, executes the computation ma to expose its effects, calling the resulting value a, and passes that to function f. Evidently, the result of this application (f a) should again be a potentially side-effecting computation; hence, the type signature for bind looks like this: (>>=):: M a -> (a -> M b) -> M b. * The injection function (return a) injects a pure value into a computation. Its type signature is: return :: a -> M a. In practice, each effect usually comes with so-called nonproper morphisms. These domain-specific operations are unique to that effect ... Seriously, how can I hack around and understand this?
- marcosdumay 11y agoOh, God, you just came to the Monad definition... From my experience, it only really falls in place after you write your first or second monad. To learn that you go in that order: 1 - Get used to use the IO monad in do notation. 2 - Learn a couple more monads. I'd recommend State and one of Parsec or Attoparsec. (As a bonus, use a bit of applicative syntax too.) 3 - Get used to write some somewhat complex one liners without the do notation. 4 - Abuse the List monad for practice. 5 - Write your own. All the time, look at the types as much as you need, but do not obsess over them.