什么是 Dlang 标准流模块?

What is the Dlang standard streams module?

什么是 Dlang 标准流模块?

https://digitalmars.com/d/2.0/phobos/std_stream.html refers to https://github.com/dlang/phobos/blob/master/std/stream.d 但是 GitHub 的这个页面不存在。

我猜,它是因为弃用而被删除了。它被什么取代了?

看看即将推出的 std.io 模块。它旨在提供一个"thin, OS-independent abstractions over I/O devices"。 这是此模块的简短 example

还有更高级的 iopipe,它使用即将推出的 std.io 模块,并为 I/O 设备提供了一个不错且高效的范围 API。

然而,随着 D 变得越来越流行并且使用越来越多,Phobos 开发团队更加关注标准模块的质量,因此添加过程变得更加严格。与此同时,dub(D 的包管理器)成为 D 事实上的包管理器,通过 dub 共享新的 "standard modules" 变得容易得多(并为它们发布适当的 SemVer 版本)。

您可能还对 Vibe.d(可能是最知名的 D 网络框架)感兴趣,它还定义了自己的流媒体功能,可以从 vibe-core. See e.g. stream.d 中独立使用以了解详细信息。

最后但同样重要的是,std.stream 还没有完全消失并继续生活在 undeaD