Book Image

D Cookbook

By : Adam Ruppe
Book Image

D Cookbook

By: Adam Ruppe

Overview of this book

Table of Contents (21 chapters)
D Cookbook
Credits
Foreword
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Introduction


D is designed to help make programs with fewer bugs. Its built-in support for assertions, contract programming, and unit tests help you verify your program at runtime. D's exception based error model helps us to ensure no runtime errors go unnoticed, without requiring return code to be checked after every function call.

D also provides numerous features to help you to prove correctness at compile time, from built-in function annotations to custom compile checks with static assert, which is capable of running D code with compile-time reflection to implement complex checks.

We'll also look at D's built-in support for documentation and platform versioning, which helps you to communicate that the code does what you intended, not just what you programmed.