Why is there so much (more) Haskell material?

Hello fairy camls,

While learning Ocaml I stumble upon many ideas (e.g. computations, purely functional datastructures, GADT) and teachers here know what more next, not to mention hordes of use cases (difference lists seen here a month ago ( adapted from haskell)).

Papers are referenced and many are written in Haskell rather than SML or Ocaml. Wadler has many references (at times in Ocaml) to quote a multi-lingual list. Even in french Ocaml courses, Haskell appear out of monad lessons (appropriate syntax ?). In general, googling most of functional terms returns a set of Haskell links.

Although lazily delaying it, at this point, I can’t postpone any longer and must learn Haskell syntax to access this literature.

I 'd like to know why is it as it is ? I mean, the brotherhood (Haskell, MLs) seems to lean towards Haskell when it comes to teaching or publications. Am I naively wrong on my corner of the internet ?

This led me to ponder about to translate everything in one another (growing and hard to maintain) or to learn many languages (hard )? Once I learn Haskell syntax why translate but use it elsewhere in Ocaml ?

Please don’t through me stones, I will never write anything in Haskell ever :smile:. Just touch it with the eyes.

1 Like

Since Haskell is pure its practitioners have to solve problems the functional way. So naturally they get to invent a lot of the many great functional programming techniques (a good example of how constraints fosters creativity). With OCaml and SML it’s easier to work around and use an effect here and there to solve your problem — but not necessarily.

I encourage you to learn enough Haskell to at least be able to read the papers. In fact if you already know OCaml it’s not that hard. But beware that if you try to directly translate their ideas to OCaml you might sometimes get caught by how their designs exploit the lazy evaluation strategy or use higher-kinded polymorphism (see this paper and that library for the latter).

6 Likes

Simply: because they have a bigger user community.

I’ve kind of wondered why Haskell has a bigger user community than the MLs, honestly. B/c … geez, to use ML, you really have to learn Hindley-Milner typing, and some about functional programming. But to use Haskell at all effectively, it seems like you have to learn a massive tower of stuff. I confess that at one point, I learned all that category theory nonsense (topoi, CCCs, NNOs, and on and on and on) but geez, the idea that working programmers have the brain space for all that just staggers me.

I don’t understand it myself.

2 Likes

Well, category theory recently got the attention from broader scientific community, not only the PL one.
See for example these:

2 Likes

Some smalltalk with Haskell may do indeed.

So far seminal and legendary publications I read hinge on something as elementary as core ML. Like lambda calculus + evaluation + (ad hoc) polymorphism. It’s like yet another skin on an axiomatic skeleton. I dreaded a thicker coat of syntax but it’s minimal. Then again, only talking about syntax formalities. The moves go beyond chattering when I see their manners.

Perhaps learning Ocaml is more akin to learning Ocaml + lightweight Haskell.

Ho! thanks for this paper (it’s a true gem). Together with lazy.t (for DS) and (monadic let!) it comes in as a trojan horse in Hackage haha . Let’s go plunder.

1 Like

I like your honesty ! Hahaha

I, too, dread this very scary stuff lurking every monad away. But I don’t think it is obligatory to dig this far underneath the rabbit hole. There is a level of formal definitions that I can’t see matching my turing needs (let alone understand).

After I was introduced to my first monad, I started to see them here and there. Hence my teenage interest for the ML in "-ell ". And then you see more algebra patterns emerge around. Unlike a round object, our patterns are more like wiring and plumbing (I believe), schemes and logics abstracted (allegedly,). Whereas with stone objects you can’t tie knots, let alone weave a dress. And I just love that a lambda function just glues everything at all levels together. Not only does it bind but also shape-shifts everywhere. This is clay gods couldn’t think of. We’re in a tie.

@XVilka (@dbuenzli) thanks for the links. It’s valuable and I can’t tell you the time it takes to build a library crawling and sieving references.

Found this joke and this other joke and the quotes at the end. If one looks at the shape of one’s code, abstracting takes you up a (loaded) node of your code tree. If you have a single leaf to program and aggressively build up a linear branch of abstraction nodes (in hope to fork them when haskell freezes over) you get a degenerate tree. A sort of pathological 1-balcony tower (the @Chet_Murthy tower) that gives a nice view but isn’t handy for watering your lilac.

Ocaml community tinkers semantic compression to the SLOC logarithm to get you actual programs. Makes approaching less daunting :slight_smile:

1 Like

It’s ‘OCaml’, btw :wink:

Is there a particular resource that you like for this? Particularly for someone already reasonably fluent in OCaml?

That was quite sometime ago but I think I mainly perused Paul Hudak’s The Haskell School of Expression at the time.

The book “real world haskell” is good.
And you probably don’t need to read it all.
I felt it has a much broader coverage than “real world OCaml”.