7.2

16 Accessing variables

To prefix, or not to prefix: that is the question.

Accessing variables could involve the use of prefixes or not.

For example, when I am accessing my racket variable inside of my "reusables.scrbl" file, I have chosen to prefix it with reusables:, as seen below.

@(require (prefix-in reusables: "reusables.scrbl"))
 
@reusables:racket

The result is a Racket link.

For reoccurring tools, such as my @itemlist-indented tool, I don’t need to keep track of them by prefixing them, because they are all in a general "utils.scrbl" file.

Prefixing is a personal choice, but can be wise if you end up splitting variables or tools into different files and need to debug.