Skip to content

L5: Extension and Infix Functions

In this lesson we will explore:

  • Deep Theory: Extension functions, extension properties, infix notation for readable DSLs, and receiver scopes.
  • Under the Hood: Static resolution of extension functions in Bytecode (Java public static final methods) and why dynamic dispatch (polymorphism) does not apply.
  • Incremental Lab (AI Chat CLI): Authoring custom String extensions to format and colorize terminal output ("Error".red(), "AI".cyan()) fluently.