There was an error while loading. Please reload this page.
The global scope is an invisible scope that persists for the entire duration of the program
The primary case where the global scope plays a role, is where global variables need cleaning up before the program exits:
import basics func main { } struct Bomb () { func __defer__ { print("Kaboom!") } } bomb Bomb
Kaboom!
Table of Contents