Great article!
Theo Kallioras
51

Great question. Here we are just trying to create a namespace to put our constants in. Doesn’t really matter if it’s a struct or enum. However you wouldn’t want anyone to create an instance of your “namespace”.

struct Constants { ... }

If you define it as a struct, it’s possible to create an instance like Constants() (unless you make the initializer private) which wouldn’t be meaningful. With enums, this is not possible.