Earlier quoted context omitted.
I'd say start with some eager functional language such as OCaml without the "object" part. Haskell code is hard to debug cuz you can't rely on good old print. Monad itself is never a silver bullet. Type systems and Composability are the true power of FP IMO.
Debugging declarative code is always hard, whatever the language. Haskell does allow you to use trace expressions which will output values to standard out, see Debug.Trace. This is no reason to avoid arguably the most popular (and state-of-the-art) function language and implementation out there.
What I Wish I Knew When Learning Haskell
31–40 of 149 posts
Re: What I Wish I Knew When Learning Haskell
#32I feel this might have grown beyond its title. Picking the point where I gave up, giving me a list of 7 vscode plugins, without any guidance as to which are more mature, doesnt feel like a thing anyone would wish to know before they start.
Take it from someone who spent 10 years on and off learning Haskell: It's a guide to navigating the boobytrapped minefield of the Haskell ecosystem, from the difficulties of installing it for the first time, to the confusing type theory.
Those aren't 7 plugins to choose from. Those are 7 plugins you should use all 7 of because there is no unified coherent Haskell IDE or plugin, but there are a dozen other broken ones that look good in the catalog.
Much the same with libraries. You need a guide to tell you which ones are usable and which are abandoned experiments, since both live side by side in the main repos.
Re: What I Wish I Knew When Learning Haskell
#33Earlier quoted context omitted.
I'm pretty sure this (evolving) article has been around well before VSCode's initial release.
I'm sure you are right. That is just picking at one thing I will admit, but I do use vscode, so when I saw a section about how to best use haskell in vscode i was interested. I'm not interested enough, or as a beginner qualified, to evaluate 7 options.
Re: What I Wish I Knew When Learning Haskell
#34Earlier quoted context omitted.
Haskell has a huge catalog of libraries you can reach for, so you don’t have to reinvent the wheel. That said, the Haskell way can seem very different than what you see in most languages. As an example, IO—or anything causing a side effect—has to happen in the IO Monad. There are good reasons for this, but it takes some getting used to.
The parent poster is not lamenting that Haskell lacks a trivial sorting function. They are lamenting that implementing a trivial sorting function in Haskell is difficult.
quicksort [] = []
quicksort (x:xs) =
let smallerSorted = quicksort [a | a x]
in smallerSorted ++ [x] ++ biggerSortedRe: What I Wish I Knew When Learning Haskell
#35What's up with the formatting on this page? In Firefox for iOS (same rendering engine as mobile Safari), all lines but the first one in code listings have 4-character indents, and lines use a larger-than-normal font size seemingly at random.
Re: What I Wish I Knew When Learning Haskell
#36Earlier quoted context omitted.
I imagined it was more in the sense of the 'Have fun implementing Quicksort!' variety, where you're fighting the language constructs, basically, to do what you want.
Haskell has a huge catalog of libraries you can reach for, so you don’t have to reinvent the wheel. That said, the Haskell way can seem very different than what you see in most languages. As an example, IO—or anything causing a side effect—has to happen in the IO Monad. There are good reasons for this, but it takes some getting used to.
Re: What I Wish I Knew When Learning Haskell
#37Earlier quoted context omitted.
I'd say start with some eager functional language such as OCaml without the "object" part. Haskell code is hard to debug cuz you can't rely on good old print. Monad itself is never a silver bullet. Type systems and Composability are the true power of FP IMO.
Debugging declarative code is always hard, whatever the language. Haskell does allow you to use trace expressions which will output values to standard out, see Debug.Trace. This is no reason to avoid arguably the most popular (and state-of-the-art) function language and implementation out there.
Re: What I Wish I Knew When Learning Haskell
#38Earlier quoted context omitted.
The parent poster is not lamenting that Haskell lacks a trivial sorting function. They are lamenting that implementing a trivial sorting function in Haskell is difficult.
I disagree. quicksort [] = [] quicksort (x:xs) = let smallerSorted = quicksort [a | a x] in smallerSorted ++ [x] ++ biggerSorted
Re: What I Wish I Knew When Learning Haskell
#39Earlier quoted context omitted.
The parent poster is not lamenting that Haskell lacks a trivial sorting function. They are lamenting that implementing a trivial sorting function in Haskell is difficult.
I disagree. quicksort [] = [] quicksort (x:xs) = let smallerSorted = quicksort [a | a x] in smallerSorted ++ [x] ++ biggerSorted
Re: What I Wish I Knew When Learning Haskell
#40Earlier quoted context omitted.
The parent poster is not lamenting that Haskell lacks a trivial sorting function. They are lamenting that implementing a trivial sorting function in Haskell is difficult.
I disagree. quicksort [] = [] quicksort (x:xs) = let smallerSorted = quicksort [a | a x] in smallerSorted ++ [x] ++ biggerSorted