Lessons

D · Easy

D · Easy. 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. Classes and inheritance

    Lesson 1 · On the house

    Classes and inheritance

    Reference-type classes, constructors, single inheritance, virtual methods by default, override, and super.

  2. Interfaces and abstract classes

    Lesson 2

    Interfaces and abstract classes

    interface declarations, implementing several, abstract methods, and final methods in interfaces.

  3. Templates

    Lesson 3

    Templates

    Function and struct templates, implicit instantiation, the ! syntax, and template value parameters.

  4. Ranges and std.algorithm

    Lesson 4

    Ranges and std.algorithm

    Lazy range pipelines with map, filter, reduce, sort, and chaining calls with UFCS.

  5. Exceptions and scope guards

    Lesson 5

    Exceptions and scope guards

    throw, try/catch/finally, custom exceptions, enforce, and scope(exit/success/failure).

  6. Unit tests and contracts

    Lesson 6

    Unit tests and contracts

    unittest blocks, assert, in/out contracts, invariants, and running tests with -unittest.

  7. Delegates and lambdas

    Lesson 7

    Delegates and lambdas

    Function pointers vs delegates, closures that capture locals, passing callbacks, and std.functional.

  8. Operator overloading

    Lesson 8

    Operator overloading

    opBinary, opUnary, opEquals, opCmp, opIndex, and opOpAssign on structs.

  9. Writing your own range

    Lesson 9

    Writing your own range

    Implement an input range struct, make it infinite or finite, and plug it into Phobos algorithms.

  10. File I/O

    Lesson 10

    File I/O

    std.file for whole files, std.stdio.File for streaming lines, writing, appending, and paths.

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