typelevel / typelevel/typelevel.github.com

Blog post: Why Type Classes?

Offen
#596 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Vorherrschende Sprache
HTML
Sterne
42
Forks
115
Ø Merge
5 T. 5 Std.
Gemergte PRs (30 T.)
7

Beschreibung

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.

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Beginne damit, den Einstiegspunkt für Blogbeiträge der Website zu finden, und sieh dir vorhandene TypeLevel-Beiträge im Hinblick auf Struktur und Konventionen für die Veröffentlichung an. Der fertige Beitrag sollte die praktischen Vorteile von Type Classes erläutern, Beispiele aus TypeLevel-Bibliotheken verwenden, auf Bedenken hinsichtlich Effizienz und Komplexität eingehen und den verringerten Lock-in mit flexiblen IO-Engines in Verbindung bringen.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
scala
Bereich
content
Issue-Typ
Dokumentation
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.