Generated by DeepSeek V3.2| D (programming language) | |
|---|---|
| Paradigm | Multi-paradigm |
| Designer | Walter Bright |
| Developer | Walter Bright, Andrei Alexandrescu (since 2006) |
| Latest release version | 2.108.1 |
| Latest release date | 01 December 2024 |
| Typing | Static, strong, inferred |
| Influenced by | C++, C#, Java, Eiffel |
| Influenced | Rust, Swift |
| Operating system | Cross-platform |
| License | Boost Software License |
D (programming language) is a general-purpose, systems programming language created by Walter Bright with its first stable release in 2001. It combines the performance and control of low-level languages like C++ with modern features such as garbage collection, type inference, and advanced compile-time function execution. Designed for practicality, it aims to offer high performance for tasks ranging from operating system kernels to web applications while improving developer productivity and code safety.
The development of D was initiated in 1999 by Walter Bright, known for his work on the Digital Mars C++ compiler, to address perceived complexities and shortcomings in C++. The language was officially announced in 2001, with its design drawing inspiration from multiple sources including C++, Java, and Eiffel. A significant evolution occurred in 2006 with the release of D2, a major revision that incorporated contributions from Andrei Alexandrescu, author of Modern C++ Design, which shifted the language towards a more cohesive and safe design. Since then, development has been managed by the D Language Foundation, with reference compilers like DMD and GCC's GDC being central to its ecosystem.
D is a multi-paradigm language supporting object-oriented programming, generic programming, functional programming, and imperative programming. Key features include built-in support for unit testing, contract programming, and true modules to improve code organization. It provides comprehensive facilities for compile-time function execution and template metaprogramming, allowing for powerful code generation and validation. Memory management is flexible, offering both manual control via pointers and safe, automated management through a garbage collector, with features like scope guards and RAII for deterministic cleanup.
The syntax of D is deliberately familiar to programmers from C, C++, and Java traditions, easing adoption while introducing cleaner semantics. Notable syntactic improvements include a unified API for arrays with built-in properties like `.length` and support for array slicing. Semantically, D enforces memory safety in designated `@safe` code, prohibiting operations like pointer arithmetic that could lead to buffer overflows. It also features advanced type inference with the `auto` keyword, mixin templates for code injection, and a powerful alias this declaration for property forwarding.
The primary reference compiler is DMD, developed by Walter Bright, which is known for its fast compilation speed. For production use, the GCC-based GDC and LLVM-based LDC compilers offer robust optimization and support for diverse architectures like x86-64 and ARM. Essential tooling includes the Dub package manager for dependency management and project building, and integration with major IDEs such as Visual Studio Code and JetBrains' IntelliJ IDEA. The language also supports foreign function interfaces for seamless interoperability with libraries written in C and C++.
The D community is coordinated by the non-profit D Language Foundation and is active in open-source development on platforms like GitHub. It is used in various commercial and open-source projects, including Facebook's now-deprecated parser generator and the Société Générale banking group. Notable adopters in the video game industry have included Remedy Entertainment and BioWare, leveraging D for performance-critical tools and game engine components. The annual DConf conference, along with active forums and contributions to projects like the Phobos standard library, fosters ongoing development and advocacy for the language.
Category:Systems programming languages Category:Object-oriented programming languages Category:Programming languages created in 2001