Regarding concurrency in Haskell, there is a very good book from Simon Marlow, "Parallel and Concurrent Programming in Haskell".
Agreed -- I found Haskell most confusing at first because of the lack of syntax. My brain kept wondering where the rest of the syntax was. Not to be too dramatic, but I think Haskell is kind of like programming "poetry" in this regard.
When I first start I though there was so MUCH syntax, (->), (<*>), (<$>), (>>=), (.), ($), etc
I realized pretty early on all these were just functions, that was cool experience for me. Even the types are sort of functions.
Re:Reading Simple Haskell
by lalaithion on Sunday December 10, 2017 @03:03AM
(#15890491)
One fun thing is how -> is basically just an infix operation that takes two types as arguments and returns a new type.
add :: (->) Int Int add x y = x + y
It's the function type, data (->) a b. It is commonly written in infix notation though.
Re:Reading Simple Haskell
by junkscience2017 on Saturday December 09, 2017 @08:28PM
(#15889242)
Go is impoverished compared to Haskell but not when it comes to concurrency. The Haskell analogues for these concurrency primitives seem laborious...and they were even moreso prior to the advent of the `async` library.
A commenter on /r/haskell[0] noted that there is actually a library that mimics Go Channels a bit closer, called GoChan[1]. That said, I think `async` is the idiomatic choice, so it probably makes more sense to keep it.
[0] https://www.reddit.com/r/haskell/comments/7ilhb9/a_tour_of_g...
[1] https://hackage.haskell.org/package/gochan-0.0.2/docs/Contro...
Which is strange. It should be possible to implement proper CML-style concurrency in Haskell, which is strictly more expressive than the go concurrency model.
Wow that resource is super clever and useful, I wish it had the full "Tour"!
Also, readers might be interested in A Tour of Go in Haskell, which is the concurrency chapter of A Tour of Go, but just...in Haskell - https://a-tour-of-go-in-haskell.syocy.net/en_US/index.html.