Denis Defreyne

A programming language with no globals

Based on A globally available filesystem is a security liability.

An incomplete list of globals:

  • Filesystem
  • Network
  • Environment variables
  • Current date and time
  • Random seed
  • Process spawner
  • Native functions (FFI) caller
  • Current geolocation

A programming language with no globals would not be able to access the filesystem or network, and that is a good thing. The filesystem and network could be injected into the main function:

fn main(universe) {
  // universe.filesystem
  // universe.network
  // universe.time_now
  // …
}
Note last edited November 2023.