typelevel / typelevel/typelevel.github.com

Blog post: Why Type Classes?

Aperta
#596 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Lingua principale
HTML
Stelle
42
Fork
115
Merge medio
5g 5h
PR unite (30g)
7

Descrizione

Hypothetical blog post that might be quite helpful, for anyone who wants to pick it up.

Lay out the argument for why type classes are a helpful way to do things. Ideally, this should not waste much time getting into the nitty-gritty of what a type class is, just link to the details (where?). Instead, focus on why type classes are a good business decision -- how they help promote better, more maintainable designs via cleaner abstractions. Provide examples of various sorts of type classes from various TL libraries. Make the case that they are fine from an efficiency POV, and not nearly as complicated as some people make it sound -- they're just a different kind of interface.

In particular, emphasize the way that the type class approach promotes better flexibility down the road, and resists too much lock-in: by stating exactly your requirements, it allows you to use whatever components fit those requirements. Possibly say in as many words that a type class based approach to the IO level allows you to be flexible even about the main engine driving the applications, and thus resists lock-in. Be clear that this is why, while cats-effect has a world-class IO engine, we tend to think of the type classes as the most important part, so that the users have this long-term flexibility.

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Inizia individuando il punto di ingresso dei post del blog del sito e esaminando i post TypeLevel esistenti per la struttura e le convenzioni di pubblicazione. Il post completato dovrebbe spiegare i vantaggi pratici delle type class, usare esempi dalle librerie TypeLevel, affrontare le preoccupazioni relative a efficienza e complessità e collegare la riduzione del lock-in a motori IO flessibili.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
scala
Ambito
content
Tipo di issue
Documentazione
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.