Stop Writing Classes
Next Day Video · 8 則 HN 推薦
影片問答
可以請 AI 解釋目前片段,或總結整部影片。如果回答附有時間戳記,點選即可跳到對應片段。
試著問:這裡講的是什麼意思?
需使用 Google 登入。確認前可查看最多會扣除多少點數。
Jack Diederich's PyCon 2012 talk argues that classes are overused in Python and walks through real code, refactoring away unnecessary classes, exceptions and modules. It popularized the heuristic that a class with two methods, one being __init__, should be a function.
HN 推薦的原因: HN returns to it repeatedly as the canonical argument for simplicity and against premature abstraction, and several commenters say it changed how they write code.
“Jack Diederich has a great video called Stop Writing Classes: It's about Python, but the observation can apply to several languages.” 閱讀 HN 討論 ↗