Skip to content
Protocols

Protocols

A protocol is a set of messages, usually fewer than 4. There is no explicit language construct for protocols - they are just a way to organize behavior and design programs.

Gab’s builtin package makes use of protocols heavily.

The purpose of this is two-fold:

  • Encourages building composable pieces
  • Allows user-types to seamlessly extend code in other packages.

The rest of this section contains documentation for various protocols provided by the builtin package.