AI Features

Reference Variables

This lesson explains some terminology used with reference variables and the use of the ref keyword.

Terminology

We have frequently used the phrase “provide access to” throughout the course. For example, slices and associative arrays do not own any elements but provide access to elements that are owned by the D runtime. Another phrase, identical in meaning, is “being a reference of” as in “slices ...