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

  1. Template constraints and static if

    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.

  2. Compile-time function evaluation

    Lesson 2

    Compile-time function evaluation

    CTFE: run ordinary functions at compile time through enum, static, and template arguments.

  3. Mixins

    Lesson 3

    Mixins

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

  4. Compile-time reflection

    Lesson 4

    Compile-time reflection

    __traits and std.traits: list members, inspect fields and attributes, and build generic serializers.

  5. The std.range toolkit

    Lesson 5

    The std.range toolkit

    iota, chain, zip, enumerate, chunks, stride, cycle, retro, and lockstep for composing sequences.

  6. Function attributes

    Lesson 6

    Function attributes

    pure, nothrow, @safe, @trusted, @system, @nogc, and attribute inference for templates.

  7. Memory without the GC

    Lesson 7

    Memory without the GC

    Stack allocation, malloc/free from core.stdc.stdlib, scope classes, GC control, and RAII cleanup.

  8. Message-passing concurrency

    Lesson 8

    Message-passing concurrency

    std.concurrency: spawn threads, send and receive typed messages, ownerTid, and shared data rules.

  9. Data parallelism

    Lesson 9

    Data parallelism

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

  10. Struct lifetime and RAII

    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.

All lessons