Structs within Structs

What happens if I nest a struct definition within a struct definition? Are there any advantages of doing it this way, or is it a recipe for disaster?

struct Struct {
   struct nestedStruct { 
      // variables here 
   } 
}

It could work (feels like C) but in swift maybe nested types are what you’re looking for, see for reference:

2 Likes