Reading diagrams / Topic 10 of 42
Definitions or only types
The rule
An arrow is solid when the package refers to at least one definition of the other, and dashed when it names only types. Select a package to read the counts: how many definitions of the other package it refers to, and how many of its types it names.
A package that names only types can describe values of those types, but it refers to no function of the other package.
- A dashed arrow, with no definitions, rules out that the package refers to any function of the other.
- A solid arrow, with definitions, confirms that the package refers to one. Whether that code runs is still the question from the last topic.
Add up every arrow that ends at a package, counting each definition referred to and each type named, and you get its uses from the rest of the program. That count is printed on the box, as in “13 uses”. The box's height comes in three sizes: no uses, fewer than a third of the most used box's, and more.
- A larger printed count confirms that its package is used more. A taller box always has the larger count; for two boxes of one height, compare their numbers.
- Used more is not more important. The last topic's rule still holds: the diagram has no field for importance.
The same Koa program. Select a box to read its arrows.
Loading the layer diagram.
How to read this: what each mark in these pictures means
Loading the worked examples and practice.