Nested types in Swift - what is the good practice?
问题 I have a swiftlint warning that bothers me. warning: Nesting Violation: Types should be nested at most 1 level deep (nesting) However, the nesting of structs is an established programming technique, and quite a few people advocate it. Edit: Indeed @vadian points out the Swift language guide's rule: To nest a type within another type, write its definition within the outer braces of the type it supports. Types can be nested to as many levels as are required . I am aware it clashes with the use