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

Chapter 1. Core Tasks

In this chapter, we will get started with D and explore some of its core features. You will learn the following recipes:

  • Installing the compiler and writing a "Hello World" program

  • Adding additional modules (files) to your program

  • Using external libraries

  • Building and processing arrays

  • Using associative arrays to translate input

  • Creating a user-defined vector type

  • Using a custom exception type

  • Understanding immutability

  • Slicing a string to get a substring

  • Creating a tree of classes