Elm Europe 2017 - Evan Czaplicki - The life of a file
4 人推荐 · 跨 4 个月 · 2019–2025

中文导读
Elm 创造者 Evan Czaplicki 的经典演讲,探讨单一代码文件如何变大以及何时该拆分代码。他极力主张不到痛处绝不拆文件,并告诫开发者警惕过早抽象。
为什么 HN 推它
讨论代码就近放置(colocation)和推迟抽象时的必看参考,切中工程痛点。
「把所有东西先塞进同一个文件,直到你真的觉得痛了为止。这个演讲抓住了精髓。」HN 网友原话:Just stick everything in the same file until it actually hurts. This presentation[0] gets it right.
英文原摘要(HackerTube / Claude 整理)
Elm creator Evan Czaplicki's talk on how a file grows and when to split code up. He argues for keeping code in one file until it hurts and warns against premature extraction.
Recommended as the argument for code colocation and delaying abstraction.
HN 上的提及
The creator of Elm has a talk that mentions this
Just stick everything in the same file until it actually hurts. This presentation[0] gets it right.
this great talk by Evan Czaplicki (Elm creator)
Here is one about how to structure a project (roughly)