struct vs. class in Swift

structclass
Value typeReference type
Cannot inherit or be inheritedHas inheritance
On the StackOn the heap
Faster Slower
No memory leaksPotential memory leaks
Deep copies
True immutability
Threadsafe
Works with Objective-C code
Struct vs. Class

Use struct as much as possible.

I guess Swift learns this from C#.

Java doesn’t have struct keyword.