Course of Raku

Part 3. Objects, I/O, and exceptions

Classes and objects

  • Classes — 2 exercises
    • Type objects and instances — 1 quiz
  • Attributes — 4 exercises
    • Read-write attributes
    • Default values — 1 quiz
  • Methods — 4 exercises
    • Private attributes
    • Methods with parameters
    • Methods calling methods — 1 quiz
  • Class methods — 1 quiz and 2 exercises
  • Subroutines vs methods — 1 quiz and 2 exercises
  • Inheritance — 3 exercises
    • Overriding methods — 1 quiz
  • Roles — 3 exercises
    • Composing several roles
    • Adding a role to an object — 1 quiz
  • Introspecting objects — 2 exercises
    • The inheritance chain — 1 quiz
  • The metaobject protocol 🆕 — 4 exercises
    • Meta-methods — 1 quiz
    • Adding methods at runtime

Input and output

  • Standard streams — 1 quiz and 3 exercises
  • Working with files — 3 exercises
    • Appending to a file — 1 quiz
  • Working with directories — 3 exercises
    • Listing a directory — 1 quiz
  • Deleting files and directories — 1 quiz and 2 exercises
  • File handles — 1 quiz and 4 exercises
  • Running external programs 🆕 — 4 exercises
    • run and shell — 1 quiz
    • Capturing output
    • The Proc object — 1 quiz
    • The environment — 1 quiz

Exceptions

  • Catching exceptions with try — 1 quiz and 3 exercises
    • Not every error is immediate
  • The CATCH phaser — 1 quiz and 3 exercises
  • Exception objects — 1 quiz and 3 exercises
  • Soft failures — 1 quiz and 3 exercises
  • Custom exceptions — 1 quiz and 3 exercises

The Complete Course of the Raku Programming Language

About the course · GitHub

Free and open source · Written by Andrew Shitov · Supported by The Perl & Raku Foundation

© 2021–2026 by Andrew Shitov