Chapter 4. Procedural Lifetime

The D programming language contains value types, pointer types, and reference types. Each type has unique storage attributes and manifests a different functional lifetime. Additionally, type attributes can affect the lifetime of the associated declaration, occasionally in rather unique ways. The aim of this chapter is to explore the lifetime guarantees afforded to each kind of type and to elucidate some of the more specialized language behavior related to the lifetime of reference types.

D Language Type Classifications

Before diving into the particulars of specific data types, it may be useful to review how types are classified. D language types fall into three main categories:

Value: A value type is a type whose data ...

Get Learn to Tango with D now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.