13.4.2 The interface module

We can now write a first draft of the interface module for our library:

define module time
  // Classes
  create <time>, <time-of-day>, <time-offset>;
  // Generics
  create say, encode-total-seconds;
end module time;

In the preceding definition, the time interface module creates and exports (makes visible) three classes and two functions. We use the create clause, because we do not intend to define any implementations in the time-library interface module itself — that will be done in an implementation module, which will use the time-library module as its interface. The create clause causes the names to be reserved in the time interface module, with the requisite that definitions be provided by some other module in the same library.

Comparison with C: The Dylan create clause is roughly analogous to the C extern declaration.