为什么 *nix 程序使用这么多文件?

发布于 2024-10-19 20:28:30 字数 322 浏览 2 评论 0原文

在一个卷上拥有数千个文件是否具有编程优势?

例如,我下载的 Emacs 22.3 存档中有超过 2,700 个文件。这些真的有必要吗? Notepad++ 在功能上与它相当,其核心只有 15-30 个文件,具体取决于您使用的插件,并且它可以与这些插件完美配合。

当然,Emacs 并不是唯一的例子,MinGW for C/C++ with MSYS 有 8,800 个文件,而 Visual Studio 2008(包括 IDE 和 C/C++ 编译器)有 12,000 个文件。

我真的需要那么多文件才能使用 Emacs,还是它们为原始程序的开发人员提供了优势,或者两者兼而有之?

Is there a programmatic advantage to having thousands of files on a volume?

For example, the archive I downloaded for Emacs 22.3 has more than 2,700 files in it. Are those all really necessary? Notepad++, which is comparable in functionality, has a mere 15-30 files in its core, depending on what plugins you use, and it works perfectly well with those.

Of course, the Emacs isn't the only example -- MinGW for C/C++ with MSYS is 8,800 files, while Visual Studio 2008 -- including the IDE and the C/C++ compilers -- is 12,000 files.

Do I really need that many files in order to be able to use Emacs, or do they provide an advantage to the developers of the original program, or both?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

離人涙 2024-10-26 20:28:30

您给出的示例是按设计以这种方式结束的。

  • Emacs:Emacs 是一个 Lisp 脚本解释器。它的 GUI 原语显然是为了支持文本编辑应用程序,但底层语言和核心库是通用的。使用脚本而不是插件的决定使得破解、定制和扩展 Emacs 的功能变得非常容易。无数开发人员和工程师使用 Emacs 为专有语言添加语法突出显示、代码完成以及输入表单。从这个角度来看,您可以将 Emacs 视为现代办公生产力软件包的宏和脚本功能的先驱。
  • IDE 和 C/C++ 编译器:通过将源代码与静态和动态库相结合来编译和链接 C/C++ 应用程序。现代 C/C++ 编译器附带了大量库,但大多数典型应用程序仅使用其中的一小部分。将此内容分离并组织在单独的文件中有助于管理供应商和用户的大量内容。

The examples you give ended up this way by design.

  • Emacs: Emacs is a lisp script interpreter. Its GUI primitives are clearly intended to support text editing applications, but the underlying language and the core libraries are general purpose. The decision to go with scripts instead of plugins makes it very easy to hack, customize and expand the capabilities of Emacs. Countless developers and engineers have used Emacs to add syntax highlighting for proprietary languages, code completion, as well as input forms. In this light, you can think of Emacs as a forerunner for macro and scripting features of modern office productivity packages.
  • IDE and C/C++ compilers: C/C++ applications are compiled and linked by combining source code with static and dynamic libraries. A modern C/C++ compiler comes with a wide array of libraries, of which most typical applications would only use a fraction. Separating and organizing this content in separate files helps manage the large volume of contents for both the vendor and the users.
柠檬 2024-10-26 20:28:30

文件是一种简单、自然的逻辑单元,可以轻松地用代码处理。文件系统旨在轻松处理数千个文件。说 Emacs 中有太多文件表明存在实际可能不存在的问题。

Files are a simple, natural, logical unit that can be easily handled in code. File systems are designed to effortlessly handle thousands of them. Saying that Emacs has too many files in it suggests a problem that might not actually exist.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文