typelevel/cats-effect

A little more `IO` and a little less `F[_]`

Open

#3 133 ouverte le 27 août 2022

Voir sur GitHub
 (13 commentaires) (10 réactions) (2 assignés)Scala (572 forks)batch import
:books: docsgood first issue🥺 help wanted

Métriques du dépôt

Stars
 (2 230 stars)
Métriques de merge PR
 (Merge moyen 21j 23h) (18 PRs mergées en 30 j)

Description

I think we've all converged on the idea that beginners should definitely start with concrete IO. And that there's no harm in continuing to use concrete IO indefinitely; indeed many teams are doing this.

So this is all well and good. Except our docs are full of stuff like this:

https://github.com/typelevel/cats-effect/blob/3da61a59438da30f9bb01192fec9e690aacc3ce4/std/jvm/src/main/scala/cats/effect/std/Console.scala#L30-L39

Which invariably leads to beginner questions: what is F[_]? To which a quick answer is "replace every F you see with IO".

Well, woops 😛

def myProgram[IO[_]: Console : Monad]: IO[Unit] = ???

I think we should prioritize writing examples with concrete IO, since that is exactly what we are pitching. Providing a second example written in terms of F[_] (possibly via a fancy tabbed switcher on the website) would be reserved for bonus points.

Guide contributeur