Skip to content

[Setup] Structure of Files and Nested Types #105

Discussion options

You must be logged in to vote

Hi @kkarenvoo05,

Thank you for asking a question here on GitHub!

I think there might be a confusion between nested types (see Apple Swift Documentation) and type properties (great article provide an overview of what's possible in Swift).

Nested types are a great way to structure types that are very closely bound to each other and where a type-based name scoping makes sense (such as the cards example in the documentation). The feedback for assignment 1 was probably targeted to a nested type that would make sense to be used across the app and whose scope goes beyond a single type. Therefore it would make sense to put it in a separate file & outside of the scope of a parent type.

Properties …

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by PSchmiedmayer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Setup
Labels
None yet
2 participants