typelevel / typelevel/typelevel.github.com

Blog post: Why Type Classes?

未關閉
#596 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

主要語言
HTML
星號
42
分支
115
平均合併
5 天 5 小時
30 天內合併 PR
7

描述

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.

貢獻指南

開啟貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

研究方向

首先定位該網站部落格文章的入口點,並查看現有的 TypeLevel 文章,了解其結構和發布慣例。完成的文章應解釋型別類別的實際優點,使用 TypeLevel 程式庫中的範例,回應對效率和複雜性的疑慮,並將降低鎖定與彈性的 IO 引擎連結起來。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
scala
領域
content
Issue 類型
文件
難度
4/5
預估耗時
3-5 天
活躍度
停滯
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。