Dan Luu 写系统问题时,习惯先测量、再对照、最后才下结论。把「Literature review on the benefits of static types」放到智能体、评测和线上系统里,真正要问的是:默认做法会不会系统性失败。下面用中文整理成可执行的工程笔记,去掉原站导航和无关链接。
A Large Scale Study of Programming Languages and Code Quality in Githu
There are some pretty strong statements about types floating around out there. The claims range from the oft-repeated phrase that when you get the types to line up, everything just works, to “not relying on type safety is unethical (if you have an SLA)” 1 , " It boils down to cost vs benefit, actual studies, and mathematical axioms, not aesthetics or feelings ", and 一个稳妥判断是 programmers who doubt that type systems help are basically the tech equivalent of a
Let's take a look at the empirical evidence that backs up these claims.
A controlled experiment to assess the benefits of procedure argument t
Click here if you just want to see the summary without having to wade through all the studies. The summary of the summary is that most studies find very small effects, if any. However, the studies probably don't cover contexts you're actually interested in. If you want the gory details, here's each study, with its abstract, and a short blurb about the study.
What is the effect of programming languages on software quality? This question has been a topic of much debate for a very long time. In this study, we gather a very large data set from GitHub (729 projects, 80 Million SLOC, 29,000 authors, 1.5 million commits, in 17 languages) in an attempt to shed some empirical light on this question. This reasonably large sample size allows us to use a mixed-methods approach, combining multiple regression modeling with
An empirical comparison of C, C++, Java, Perl, Python, Rexx, and Tcl,
The authors looked at the 50 most starred repos on github for each of the 20 most popular languages plus TypeScript (minus CSS, shell, and vim). For each of these projects, they looked at the languages used. The text in the body of the study doesn't support the strong claims made in the abstract. Additionally, the study appears to use a fundamentally flawed methodology that's not capable of revealing much information. Even if the methodology were sound, th
As Gary Bernhardt points out, the authors of the study seem to confuse memory safety and implicit coercion and make other strange statements , such as
An Experiment About Static and Dynamic Type Systems; Hanenberg, S.
Advocates of dynamic typing may argue that rather than spend a lot of time correcting annoying static type errors arising from sound, conservative static type checking algorithms in compilers, it’s better to rely on strong dynamic typing to catch errors as and when they arise.
The study uses the following language classification scheme
Work In Progress: an Empirical Study of Static Typing in Ruby; Daly, M
These classifications seem arbitrary and many people would disagree with some of these classifications. Since the results are based on aggregating results with respect to these categories, and the authors have chosen arbitrary classifications, this already makes the aggragated results suspect since they have a number of degrees of freedom here and they've made some odd choicses.
In order to get the language level results, the authors looked at commit/PR logs to determine how many bugs there were for each language used. As far as I can tell, open issues with no associated fix don't count towards the bug count. Only commits that are detected by their keyword search technique were counted. With this methodology, the number of bugs found will depend at least as strongly on the bug reporting culture as it does on the actual number of b
Haskell vs. Ada vs. C++ vs. Awk vs. … An Experiment in Software Prot
After determining the number of bugs, the authors ran a regression, controlling for project age, number of developers, number of commits, and lines of code.
There are enough odd correlations here that, even if the methodology wasn't known to be flawed, I'd be skeptical that authors have captured a causal relationship. If you don't find it odd that Perl and Ruby are as reliable as each other and significantly more reliable than Erlang and Java (which are also equally reliable), which are significantly more reliable than Python, PHP, and C (which are similarly reliable), and that TypeScript is the safest languag
落地时建议先做的 5 件事
- 用自己的真实负载测,而不是只用公开榜或厂商数字。
- 把评测设计成能抓到失败模式:平均分好看但尾部崩溃,仍然算失败。
- 智能体默认不会好好用测试;要写进流程,而不是写在口头规范里。
- 性能和正确性都要有基线,改模型或改语言前后必须能对比。
- 结论写成可回滚的决策:哪一版配置、哪一版评测集、谁签字。
和智能体产品怎么接
龙虾PRO做 OpenClaw 落地时,同样吃「先测量再扩面」这条纪律:技能、数字员工和网关都要有可复现评测,而不是只看一次演示通过。
本文侧重全链路风控方法论。落地时请用自身业务单据做回放验证,不要把示例阈值直接当生产策略。 相关:风控体检 · 方案资源
常见问题 FAQ
什么是AI智能系统?
「AI智能系统」可概括为:There are some pretty strong statements about types floating around out there. The claims range from the oft-repeated phrase that when you get the types to line up, everything just 本文从定义、方法与实践要点展开说明。
为什么要关注AI智能系统?
关注AI智能系统,是因为它直接影响效率、风险与可复制性。文中指出:There are some pretty strong statements about types floating around out there. The claims range from the oft-repeated phrase that when you get the types to line up, everything just works, to “not relying on type safety is unethical (if you have a…
如何落地AI智能系统?有哪些关键步骤?
建议按以下路径推进AI智能系统:1) 用自己的真实负载测,而不是只用公开榜或厂商数字。;2) 把评测设计成能抓到失败模式:平均分好看但尾部崩溃,仍然算失败。;3) 智能体默认不会好好用测试;要写进流程,而不是写在口头规范里。;4) 性能和正确性都要有基线,改模型或改语言前后必须能对比。;5) 结论写成可回滚的决策:哪一版配置、哪一版评测集、谁签字。。细节见正文对应章节。
AI智能系统适合哪些人或团队?
AI智能系统更适合:产品/技术负责人、运营与增长团队、需要落地智能体或自动化的中小团队、关注「AI智能系统」方向的读者。若你只需要单次聊天式问答,可先读概念;若要上生产,请重点看步骤、权限与风控相关段落。
关于「A Large Scale Study of Programming Languages and Code Quality in Githu」,本文给出了什么结论?
在「A Large Scale Study of Programming Languages and Code Quality in Githu」部分,要点是:works, to “not relying on type safety is unethical (if you have an SLA)” 1 , " It boils down to cost vs benefit, actual studies, and mathematical axioms, not aesthetics or feelings ", and 一个稳妥判断是 pro…
关于「A controlled experiment to assess the benefits of procedure argument t」,本文给出了什么结论?
在「A controlled experiment to assess the benefits of procedure argument t」部分,要点是:obably don't cover contexts you're actually interested in. If you want the gory details, here's each study, with its abstract, and a short blurb about the study. What is the effect of programming lan…