Using other modules

You will learn

How a use line is written, and what the browser can and cannot do with it.

use base::types; names a module by its path, with :: between the parts. The parser reads it as a use declaration. The compiler in your browser has no checkout of the other files, so it does not open base::types and does not check names that come from it. The native t27c resolves imports from a repository; this lesson could not run that check here.

Open the interactive lesson →