Structs vs. classes in Swift, intuitions:
Monomorphic vs. polymorphic
Stack vs. heap
Value vs. reference
Data vs. identity
Inert vs. active
Conversation
Replying to
stack vs heap isn’t particularly true, though it’s *closer* to true right now than it eventually will be
5
1
7
1
1
2
Show replies
Replying to
Replying to
Doesn’t need to conform to AnyObject for Objective-C compatibility vs. does
Look, it even corresponds to the initial letters!
2
Replying to
cool thing is that stack vs heap isn't really true. Struts can be on heap (copy on write), classes may be on stack sometimes
2
4
Replying to
I'm glad that one of those is not "has methods or not" :)
1
is "has predictable size, order & alignment, making it suitable for serializing" still a quality of structs in Swift?
1
Show replies









