TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

A Plea for Lean Software (1995) [pdf]

32 点作者 vu3rdd超过 10 年前

2 条评论

kazinator超过 10 年前
&quot;Gee, we achieved a tiny system by throwing out unnecessary things like, oh, a GUI and icons. And boy, did we ever save space by trimming unnecessary features from Modula-2 to make Oberon.&quot;<p><i>Facepalm</i>. How big is the compiler in the big picture? How much extra code do you have to write because you don&#x27;t have those language features?<p>You know, in the late 1980&#x27;s, I used a nice Modula-2 compiler called TopSpeed Modula-2.(^) It fit on a single-density 3.5&quot; floppy disk. This Modula-2 had those features that Wirth trimmed out of Oberon: subranges, enumeration types and variant records. It compiled very fast, produced compact programs and had good diagnostics. It came with a text-based IDE in which you could do the usual things like run the compiler and then navigate through the errors (all on that one floppy).<p>Making a new, incompatible language does cut bloat in one way, though: nobody has any software to port to the system.<p>Ironically, Wirth argues that one of the ways in which the system saved space was through dynamic linking. But in fact, this is the major cause of software image bloat in modern systems.<p>When a program does not use most of the functions in a dynamic library, that whole dynamic library is still there.<p>Using a smattering of dynamic components, just for a little bit of functionality from each one, is a good way to get a lot of bloat in a hurry.<p>Secondly, even if multiple programs use different features of the same library (and this is particularly a problem on Microsoft Windows) they all bundle their own copy of that library, to understandably insulate themselves from versioning issues.) This is probably why libraries are not called &quot;shared&quot; on Windows! A lot of the time they aren&#x27;t.<p>Dynamic linking with singly-instantiated read-only mappings does save space if programs truly share a single version of every component, and if the components don&#x27;t contain a lot o functionality that <i>no</i> program in the system uses.<p>---<p>^ <a href="http://en.wikipedia.org/wiki/Turbo_Modula-2" rel="nofollow">http:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Turbo_Modula-2</a>
cwyers超过 10 年前
This reads like a rather extreme case of the saying &quot;Bloat is any feature <i>I</i> don&#x27;t use.&quot;
评论 #8541205 未加载
评论 #8541085 未加载