Re-exports
public import can re-export imported declarations, making them visible to code that imports your package. This is called "re-exporting."
Default import is private, meaning imported names are only available in the current file. With public import, these names become part of your package's public API.
Re-exports are commonly used to build convenient APIs for libraries. Library authors can aggregate commonly used types from multiple subpackages into a single entry package, so users only need to import that one package. This simplifies usage while preserving flexibility in internal organization.
The code on the right demonstrates the concept of re-exports. Although it only shows regular imports here, the comments explain how to use public import to build a library's API in real projects.
Try changing import std.collection.ArrayList to public import to understand how it changes the visibility of imported declarations.