Why Go’s empty struct truly occupies zero bytes: runtime shortcut saves memory
The Go runtime shortcuts every zero‑size allocation to a single global placeholder, so all struct{} values share the same address. This makes struct{} ideal for signalling channels and, historically, for memory‑lean sets—though recent Go versions store set values in Swiss‑table maps, erasing the memory advantage.