Contract Programming ↗
Overview of D's built-in contract programming: preconditions, postconditions, and invariants enforced at runtime with language-level support for inheritance and tooling.
Learning ResourcesA fast systems programming language with native Design by Contract support.
Overview of D's built-in contract programming: preconditions, postconditions, and invariants enforced at runtime with language-level support for inheritance and tooling.
Learning ResourcesDUB is D's official package manager and build tool. It handles dependencies, project scaffolding, compilation, and integrates with IDEs and third-party build systems.
ToolsOfficial comparison table showing how D implements key programming language features across paradigms and use cases.
Official DocumentationThis community-developed OneDrive client for Linux is written in D. It synchronizes files with Microsoft OneDrive and supports account and synchronization options documented by the project. It is maintained independently of Microsoft's…
Explore project →Tilix is a GTK3 terminal emulator for Linux, written in D. It supports tiling terminal panes, saved layouts and configurable terminal sessions. Upstream currently seeks maintainers and describes maintenance as minimal. Explore its…
Explore project →vibe.d is a D toolkit for asynchronous I/O, networking and web applications. It includes HTTP services, routing and facilities for concurrent programs, with additional libraries available through DUB. Start with a small HTTP endpoint from…
Explore project →No community resources are listed yet. Explore all resources.
No current or upcoming events listed. Explore past events or suggest one.
Follow D jobs with Atom → Get updates in your feed reader.
No jobs listed right now.
No organizations listed yet.
r/programming subreddit · Published January 16, 2024
A fork of the D programming language, OpenD, was announced by long-time contributor Adam Ruppe, alongside a public repository and an open call for external contributions. Ruppe described the motivation as dissatisfaction with D's…
D is a systems programming language that makes formal correctness practical for high-performance software. Created by Walter Bright in 2001, D brings Design by Contract (the rigorous specification methodology pioneered by Eiffel) directly into a native-compiled, C-interoperable systems language, eliminating the traditional trade-off between performance and program verification.
D implements contracts through in, out, and invariant blocks as first-class language features, not library add-ons. This native support combines with compile-time function execution (CTFE), allowing developers to verify logic and generate code at compile time, and built-in unit testing that makes correctness checks integral to the development workflow. The language offers the low-level control and performance of C++ while adding modern features like optional garbage collection, powerful template metaprogramming, and seamless C interoperability.
D is used in game development, scientific computing, high-frequency trading, and systems programming where both execution speed and program correctness are non-negotiable. Its design philosophy is simple: formal methods shouldn't require sacrificing performance, and systems programmers shouldn't have to choose between speed and reliability. For developers who want Eiffel's correctness guarantees with C++'s performance profile, D delivers both.
D shipped native Design by Contract in 2001: preconditions, postconditions, and class invariants as first-class syntax. in (amount <= balance) isn't a comment or a separate unit test; it's the requirement itself, enforced at function boundaries and catching violations before they cascade. This collapses redundant work: teams write specifications as comments, tests, and monitoring alerts. DbC makes the specification executable once. Every null reference exception is an undeclared precondition. Every "this should never happen" comment is an unenforced invariant.
D proved native DbC works in a C-syntax systems language. Rust won mainstream adoption anyway by enforcing safety at compile time. Bugs can't compile, period. D's contracts catch logic bugs at runtime, and only if teams keep them enabled. The market chose mandatory compile-time correctness over optional runtime checks. DbC survived only where external forces demand it: Ada with SPARK in regulated avionics, Dafny in formal verification, Racket in PL research. D occupied the middle ground nobody wanted: stronger than asserts, weaker than proofs, and bypassable when inconvenient.
Beyond contracts, D delivers on its systems programming fundamentals: compile times competitive with C, runtime performance matching C++, metaprogramming that actually works without template error novels, and interoperability with C that doesn't require FFI ceremony.
Share a useful D project or resource.