Lessons
D · Medium
D · Medium. Ten lessons. Open-book quizzes. Lesson 1 free.
10 lessons · The Host · Lesson 1 free
Pass all ten lessons for the certificate. Sample · Claim

Lesson 1 · On the house
Template constraints and static if
Restrict templates with if constraints, branch at compile time with static if, and is expressions.

Lesson 2
Compile-time function evaluation
CTFE: run ordinary functions at compile time through enum, static, and template arguments.

Lesson 3
Mixins
String mixins compile generated code; template mixins paste reusable declarations into a scope.

Lesson 4
Compile-time reflection
__traits and std.traits: list members, inspect fields and attributes, and build generic serializers.

Lesson 5
The std.range toolkit
iota, chain, zip, enumerate, chunks, stride, cycle, retro, and lockstep for composing sequences.

Lesson 6
Function attributes
pure, nothrow, @safe, @trusted, @system, @nogc, and attribute inference for templates.

Lesson 7
Memory without the GC
Stack allocation, malloc/free from core.stdc.stdlib, scope classes, GC control, and RAII cleanup.

Lesson 8
Message-passing concurrency
std.concurrency: spawn threads, send and receive typed messages, ownerTid, and shared data rules.

Lesson 9
Data parallelism
std.parallelism: parallel foreach, taskPool.amap and reduce, tasks, and choosing work unit sizes.

Lesson 10
Struct lifetime and RAII
Destructors, copy constructors, @disable this(this), move semantics, and deterministic cleanup.
Sample certificate
Certificate of completion
Sign in to claim your certificate of completion.
Certificate
Finish all ten lessons, then sign in
Pass every lesson on this device (quizzes and checks). Then sign in or create an account to type your name and download the JPG.