Abstract
Chapter 1. About the author
Chapter 2. Introduction
A comparison of Python and D
Advantages and disadvantages of D
Advantages
Disadvantages
Static vs dynamic typing
Introduction
Dynamic typing explained
Setup D Environment
Chapter 3. Hello world
In Python
In D
Chapter 4. Tokenization
Keywords and Identifiers
Comments
Chapter 5. Functions and Variables
Variables
Immutable variables
References
Constant variables
Static variables
More about variables
Functions
Function arguments
Function modifiers
Pure functions
Ref functions
Auto functions
Function calls
Function overloading
`scope` and `return ref` function argument modifiers
Default arguments
More function attributes
Variadic functions
Chapter 6. Imports and Aliases
Aliases
Chapter 7. Introduction to Types
Basic types
Arithmetic conversions
Enum types
Arrays
By-value and by-reference types
Associative arrays
Type qualifiers
Chapter 8. Expressions
Assignment operator
Arithmetic operators
Increment/decrement operators
Index and slice expressions
Cat expressions
Function call expressions
Boolean and bitwise expressions
Compare expressions
In expressions
Comma expression
Cast expression
Typeid expressions
Assignment operator expressions
Conditional expression
Precedence and associativity
Import expressions
Vector operations
Other expressions
Properties
Chapter 9. Literals
Boolean literals
Null literal
Integer literals
Floating point literals
Array literals
Associative array literals
String literals
Character literals
Other literals
Chapter 10. Statements
Declaration statement
Expression statement
Block statement
Statement `if`
Statement `switch`
Final switch
Statement `while`
Statement `do … while`
Statement `for`
Statement `foreach`
`with` statement
`break` and `continue` statements
`goto` statement
Chapter 11. Functional Programming
Function pointers and delegate variables
Function literals
Chapter 12. Structs and Classes
Structs
Member functions
`this`
Visibility
Constructors
Copy constructors
Disabling constructors
Constructor Attributes
Destructors
Properties
`alias this`
`with` with scopes
Structs misc
Classes
Inheritance
Virtual functions
Other class features. Memory management
Abstract functions and classes
Interfaces
Anonymous nested classes
Using a class as an associative array index
Associative Array Properties
Unions
Chapter 13. Cast Operations
Casting between classes
Numeric casts
Struct casts
Casting type qualifiers
Casting to `void`
Void arrays
Other notes
Chapter 14. Pointers
Chapter 15. Exceptions and Scope Guard Statement
Exceptions
Scope guard statement
`nothrow` functions
Array bounds and memory checking
Chapter 16. Templates
Template Constraints
Template Specialization
Kind of templates. Eponymous templates
Eponymous templates
Metaprogramming
Metaprogramming with template specialization
Chapter 17. Mixins
Mixin statement
Template mixins
Using mixin statement and template mixins together
Chapter 18. Documentation Comments
Chapter 19. Unit Testing
Attributed Unittests
Best practices
Documented Unittests
Chapter 20. Contract Programming
`assert`
`in` and `out` conditions
`in`, `out` and inheritance
Invariants
The order of function execution
Chapter 21. Static Compilation Control
`static if`
`version` and `debug`
`static assert`
`static foreach`
Double braces in static constructs
Pragmas
Special keywords
Chapter 22. Overloading Operators
Postincrement ++ and Postdecrement -- Operators
Cast Operator Overloading
Boolean Operations
Overloading `==` and `!=`
Overloading `<`, `<=`, `>`, and `>=`
Function Call Operator Overloading f()
Static opCall
Assignment Operator Overloading
Op Assignment Operator Overloading
Index Operator Overloading
Overloading `foreach` and `foreach_reverse`
Forwarding
Chapter 23. Compile-Time Sequences
Compile-time loops
Chapter 24. Modules
Modules
Public import
Packages
`static this`
Chapter 25. User-Defined Attributes
Chapter 26. BetterC
Chapter 27. Advice for Good Programs
The D Style
Whitespace
Naming Conventions
General
Modules
Classes, Interfaces, Structs, Unions, Enums, Non-Eponymous Templates
Eponymous Templates
Functions
Constants
Enum members
Keywords
Acronyms
User-Defined Attributes
Declaration Style
Operator Overloading
Hungarian Notation
Properties
Documentation
Unit Tests
Programming patterns
Chapter 28. Introduction to the Standard Library
Ranges
Random access ranges
Output ranges
Range operations
More functional programming
`std.array`
`std.file`
`std.typecons`
Value tuples
Flags
`Nullable`
`std.variant`
`std.stdio`
struct File
Bit fields
Chapter 29. Concurrency
async/await
`dawait`
Shared variables
Synchronized code sections
Threads
`std.parallelism`
Fibers
Generators
Chapter 30. Memoizing that is caching function result in D language
std.functional.memoize from the standard library
Memoizing struct or class properties
Memoization in the D Programming Language, part 2
memoize functions
memoizeMember
Chapter 31. Passing parameters through structs with nullable fields
The problem
Variants of solutions
Example of definition and combination
Calling functions
Last considerations
Chapter 32. Modify tuple modifiers
The problem
The implementation
Possible usage
Chapter 33. Pure Dependency Injection in D
Dependency injection
Taxonomy
Advantages
Disadvantages
Types of dependency injection
Pure dependency injection
Python Dependency Injector
My D dependency injector
Providers
Classes
`Provider` and `ReferenceProvider`
`Callable` and `ReferenceCallable`
Singletons
`BaseGeneralSingleton` and `ReferenceBaseGeneralSingleton`
Three kinds of singletons
`ThreadSafeSingleton` and `ReferenceThreadSafeSingleton`
`ThreadSafeCallableSingleton` and `ReferenceThreadSafeCallableSingleton`
`FixedObject` and `ReferenceFixedObject`
`ProviderWithDefaults`
Chapter 34. Why I can’t call `new` from a template
Chapter 35. Writing thick (object oriented) D binding of a C library
Other programming languages
Introduction
Packages structure
My mixins
About finalization and related stuff
Dealing with callbacks
More little things
Static if
Comparisons
Chapter 36. How to Make Your Programs Run Hundreds to Thousands Times Faster Without Giving up Reliability and Ease of Programming
Introduction
Frequently Asked Questions
Chapter 37. What would be my choice of programming language if I was ordered to write a nuclear weapon control system?
Chapter 38. Which compiler should I use?
Comparison
Package and/or binary availability, by platform and compiler
Experimental compilers and forks