D 编程语言
D Programming Language

原始链接: https://dlang.org/

D 是一种强大、现代的编程语言,旨在实现速度和效率。它通过静态类型推断结合了静态语言和动态语言的最佳特性,从而实现简洁的代码,而不会牺牲性能。D 提供了与 C 相当的系统级访问权限,以及自动内存管理、RAII 和内置数据结构(数组、范围、字典)等功能,以实现安全可靠的开发。 该语言支持多种编程范式——经典多态、泛型、函数式风格等,为各种项目提供灵活性。D 在并发方面也表现出色,具有不可变数据和消息传递机制。开发者可以在需要时使用原生指针和内联汇编来微调性能,并由 `@safe`、`@trusted` 和 `@system` 属性控制安全检查。 D 语言由 D 语言基金会支持,适用于从小脚本到大型应用程序的各种项目,优先考虑快速编译、可读性和运行时速度。可通过 run.dlang.io 获取 IDE 集成和实验工具。

一场 Hacker News 的讨论围绕着 D 编程语言 (dlang.org) 出现在首页展开。一些人质疑其可见性,认为其采用率有限,而另一些人则为 D 辩护,强调它比 Rust 拥有更简单的所有权和借用系统,以及更快的编译时间。 分享了一个链接,详细介绍了 D 的所有权和借用方法。有人提出了关于在指针无法复制时共享对象的问题,引发了关于 D 如何处理这种情况的讨论。 一个关键点浮出水面:D 率先引入了现在出现在主流语言中的特性,这削弱了其独特的卖点。D 代码在大型语言模型 (LLM) 训练数据中的缺乏也被认为是更广泛使用的障碍,但一位评论员认为这不应该阻止熟练的程序员。总体情绪倾向于 D 是一种功能强大的语言,但潜力尚未完全实现。
相关文章

原文

D is a general-purpose programming language with static typing, systems-level access, and C-like syntax. With the D Programming Language, write fast, read fast, and run fast.

Fast code, fast.


your code here

Got a brief example illustrating D?

Submit your code to the digitalmars.D forum specifying "[your code here]" in the subject.

Upon approval it will be showcased here on a random schedule.

Support the D language

D is made possible through the hard work and dedication of many volunteers, with the coordination and outreach of the D Language Foundation, a 501(c)(3) non-profit organization. You can help further the development of the D language and help grow our community by supporting the Foundation.

Donate Learn More About The Foundation

Lots of to our sponsors and contributors.

Run

Configure linting, formatting or completion for your favorite IDE, editor or use run.dlang.io to play and experiment with D code.

Fast code, fast.

联系我们 contact @ memedata.com