This is very well put indeed. I tend to do the same in my projects for big types: only vars and init in main type body, everything else in extensions, which has an added bonus that those extensions could be moved to separate files (aside the infamous problems with overexposing of member visibility). To keep things semi structured I comment the relevant section appropriately:
struct Foo {
var x: Int
var y: Int
// MARK: Foo.Protocol name, or an "informal" extension name, or a file name if extension is in a file
var z: Int
}
here z
is perhaps only used in the relevant extension / file, by specifying the extension / file name it is easier to find such dependencies.
There's also a potential collision course with the "strict conformances" feature we may have one day, a variation of which was pitched recently. In the strictest form it is "a conformance extension only has protocol conformance and nothing else".