ensure - brombres/Rogue GitHub Wiki
ensure<<variable>>(optional-args)
local a : SomeType
...
ensure<<a>>(x) # equivalent to: if (not a) a = SomeType(x)
local list : SomeType[]
...
ensure<<list>> # if no args are given then empty args (`()`) are implied.
ensure is a templated command that creates and assigns a new object if the given reference variable is null or zero. It distills a common boilerplate pattern into a succinct statement.