Programming in D: Tutorial and Reference Front Cover

Programming in D: Tutorial and Reference

Description

The main aim of this book is to teach D to readers who are new to computer programming. Although having experience in other programming languages is certainly helpful, this book starts from the basics.

D is a multi-paradigm system programming language that combines a wide range of powerful programming concepts from the lowest to the highest levels. It has C-like syntax and static typing. It pragmatically combines efficiency, control, and modeling power, with safety and programmer productivity in mind.

Each chapter is based on the contents of the previous ones, introducing as few new concepts as possible. It is recommended that the book is read in linear fashion, without skipping chapters if possible.

Although this book was written with beginners in mind, it covers almost all features of D. More experienced programmers can use the book as a D language reference by starting from the index section.

Blurbs from the back cover:

  • “D is pristine, clean, immensely powerful, and arguably the actual state-of-the-art programming language. Ali’s book is a gem. Clear, concise, and complete.” – Olivier Henley
  • “I have been using Ali’s online D book to teach D at the university level. It is up-to-date, complete, and most importantly, extremely readable. Having a print version is even better! This is now the ‘go-to’ book for learning D programming.” – Chuck Allison, Professor and Chair, Computer Science Department, Utah Valley University
  • “Ali’s explanations are succinct and on target. I like that he provides rationale for why D was designed in a particular way and how I can use it most effectively. This is the best computer language book I’ve read.” – Robbin Carlson, Luthier and Enterprise Architect
  • “I taught a CS2 Data Structures class in D with more success and student appreciation than when using either C++ or Java as it’s an ideal language to express the relevant concepts at all scales, from detailed to big picture, without needless complexity.Ali Çehreli’s tutorial played a central role supporting students especially during the first half of the course — without it the course simply would not have worked, so “many thanks Ali” — and an important part of that is its linearity — it can be read with only backward dependencies. This meant that with hard work even students of little experience and only moderate current abilities could get up to speed, and we saw just that. It is hard to overstate this factor. I unreservedly recommend this book to all.” – Dr. Carl Sturtivant, University of Minnesota Department of Computer Science & Engineering
  • “This book is one of the best guides through the language that I’ve seen.” – Andrew Wray, D Enthusiast
  • “I encourage anyone considering D to read this book. Not exactly ‘D for Dummies’ but it’s easy to follow even if you don’t have much experience with compiled languages.” – bachmeier, Reddit user
  • “Having worked through the book, I have to say this is one of the easiest to follow and distraction free read there is and the fact that it made learning a new language a total breeze really impressed me.” – Imran Khan, Student

Table of Contents

  • The Hello World Program
  • writeln and write
  • Compilation
  • Fundamental Types
  • Assignment and Order of Evaluation
  • Variables
  • Standard Input and Output Streams
  • Reading from the Standard Input
  • Logical Expressions
  • if Statement
  • while Loop
  • Integers and Arithmetic Operations
  • Floating Point Types
  • Arrays
  • Characters
  • Slices and Other Array Features
  • Strings
  • Redirecting the Standard Input and Output Streams
  • Files
  • auto and typeof
  • Name Scope
  • for Loop
  • Ternary Operator ?:
  • Literals
  • Formatted Output
  • Formatted Input
  • do-while Loop
  • Associative Arrays
  • foreach Loop
  • switch and case
  • enum
  • Functions
  • Immutability
  • Value Types and Reference Types
  • Function Parameters
  • Lvalues and Rvalues
  • Lazy Operators
  • Program Environment
  • Exceptions
  • scope
  • assert and enforce
  • Unit Testing
  • Contract Programming
  • Lifetimes and Fundamental Operations
  • The null Value and the is Operator
  • Type Conversions
  • Structs
  • Variable Number of Parameters
  • Function Overloading
  • Member Functions
  • const ref Parameters and const Member Functions
  • Constructor and Other Special Functions
  • Operator Overloading
  • Classes
  • Inheritance
  • Object
  • Interfaces
  • destroy and scoped
  • Modules and Libraries
  • Encapsulation and Protection Attributes
  • Universal Function Call Syntax (UFCS)
  • Properties
  • Contract Programming for Structs and Classes
  • Templates
  • Pragmas
  • alias and with
  • alias this
  • Pointers
  • Bit Operations
  • Conditional Compilation
  • is Expression
  • Function Pointers, Delegates, and Lambdas
  • foreach with Structs and Classes
  • Nested Functions, Structs, and Classes
  • Unions
  • Labels and goto
  • Tuples
  • More Templates
  • More Functions
  • Mixins
  • Ranges
  • More Ranges
  • Parallelism
  • Message Passing Concurrency
  • Data Sharing Concurrency
  • Fibers
  • Memory Management
  • User Defined Attributes (UDA)
  • Operator Precedence
  • Exercise Solutions
  • Index
To access the link, solve the captcha.
Subscribe