6 ms·
I appreciate the response. As someone that struggles with higher-level math, am I going to get a benefit out of starting with Haskell? I have built financial sy
by progmetaldev 3y ago
I appreciate the response. As someone that struggles with higher-level math, am I going to get a benefit out of starting with Haskell? I have built financial systems in various languages, so my issue isn't necessarily how to code math functionality. It's more of the abstract concepts that get me.
- Jenk 3y agoI believe you will, yes. You may not be able to jump right in to some of the deep discussions about type categories, I certainly can't, but I still have learned a lot from Haskell and both continue to use Haskell itself and use what it has taught me in other languages to my betterment.
- progmetaldev 3y agoThank you for the explanation and suggestion. Sounds like it will be worth my effort to at least learn, just for new ways of developing, and how that affects any other language I touch.
- Jenk 3y agoAs a quick example, a lot of what @Iceland_jack has mentioned I can make sense of, but I wouldn't have been able to contribute to that. I guess it is a bit like learning a foreign language and I am at the point of being able to understand what a native speaker is saying to me, but my responses are probably garbled nonsense. :) However I am still confident that what I have learnt has empowered me to be a better developer.
- Iceland_jack 3y agoThe abstract concepts give you the tools to quickly classify a datatype. They are not limited to Haskell and let you ask the right questions of datatypes in any language. The foundational concept is functoriality, i.e. mapping over the argument of a type. Whether a datatype has an instance of 1. (covariant) Functor 2. Contravariant functor 3. Functor+Contravariant (phantom argument), or 4. neither says a lot about its structure and tells me what further questions I can ask (what hierarchies I can expect): A datatype can only be a Monad if is covariant. It can only be Divisible and Decidable if it is contravariant. If it is both (3.) then its argument is not used (phantom) and can be mapped to any type. If it is neither (4.) it can be invariant (where the argument appears in both positive and negative position: like the Endo datatype) or a more complicated datatype like GADT, which would require a more complicated functor.