1-3: Data Flow
As any computer program, BushelScript scripts need to shunt data around to get things done.
See also: Quick Tutorial.
Anonymous#
The that
keyword refers to the result of the last sequenced expression (i.e., whatever was discarded at the end of the previous line). This is called anonymous data flow because there is no naming involved. It is somewhat analogous to shell script pipes (|
) or the implicit data flow between actions in Shortcuts and Automator.
Since all language structures are expressions, they always result in a value, which means the value of that
is almost always meaningful. However, at the beginning of a function, that
evaluates to unspecified
since there is no previous expression.
Anonymous data flow is encouraged instead of variables whenever reasonable, but don't feel restricted to it.
Variables#
Variables are terms defined using a let
expression. As all terms, they can shadow other terms, and they may consist of multiple words.