Programming in D: The Ultimate Guide for Software Engineers
Gain insights into D programming by exploring variables, loops, and advanced topics such as functions and unit testing. Discover how to build applications using this versatile language.
Ali is a principal software engineer with programming language experiences mostly in D, C++, and C. He is the author of the book Programming in D, the Secretary and a board member of The D Language Foundation, former acting president of the Silicon Valley Chapter of the ACCU, an organizer of the Silicon Valley DLang meetup group, and a team member of the revolutionary Mill CPU. One of his recent involvements has been coding guidelines and software safety in general.
Join 3.1 million developers at
What You'll Learn
- Write, compile, and run basic D programs using modules, functions, and correct syntax
- Use write/writeln and formatted output to display values with format specifiers and precision
- Read and parse user input with stdin/readln/readf and formattedRead using format specifiers
- Apply logical expressions, if/else, switch/case, and ?: to control program flow
- Implement loops (while, for, do-while, foreach) with break/continue to process data
- Manipulate arrays, slices, strings, and associative arrays (sort, reverse, slice, indexOf)
- Build robust D code with exceptions, assert/enforce, unit tests, and in/out contracts
Learning Roadmap
1.
Getting Started With D
Getting Started With D
2.
Variables and User Input
Variables and User Input
3.
Arithmetic and Logical Operations on Data Types
Arithmetic and Logical Operations on Data Types
15 Lessons
15 Lessons
4.
Conditional Statements and Loops
Conditional Statements and Loops
13 Lessons
13 Lessons
5.
Arrays, Characters and Strings
Arrays, Characters and Strings
21 Lessons
21 Lessons
6.
File Handling in D
File Handling in D
6 Lessons
6 Lessons
7.
Literals and enum
Literals and enum
6 Lessons
6 Lessons
8.
Formatted Output and Input
Formatted Output and Input
11 Lessons
11 Lessons
9.
foreach Loop and switch-case Statement
foreach Loop and switch-case Statement
8 Lessons
8 Lessons
10.
Functions
Functions
6 Lessons
6 Lessons
11.
Immutability
Immutability
5 Lessons
5 Lessons
12.
Value Types and Reference Types
Value Types and Reference Types
5 Lessons
5 Lessons
13.
Function Parameters
Function Parameters
10 Lessons
10 Lessons
14.
Program Environment
Program Environment
5 Lessons
5 Lessons
15.
Exceptions and scope
Exceptions and scope
8 Lessons
8 Lessons
16.
assert and enforce Statements
assert and enforce Statements
8 Lessons
8 Lessons
17.
Unit Testing
Unit Testing
7 Lessons
7 Lessons
18.
Contract Programming
Contract Programming
6 Lessons
6 Lessons
Ali Çehreli
Having fun programming in the D programming language in the Autonomous Driving division at Mercedes-Benz Research and Development, North America.
Trusted by 3.1 million developers working at companies
Anthony Walker
@_webarchitect_
Evan Dunbar
ML Engineer
Software Developer
Carlos Matias La Borde
Souvik Kundu
Front-end Developer
Vinay Krishnaiah
Software Developer
Built for 10x Developers












Free Resources