Advanced
Swift
Q67 / 100
What is the difference between opaque (some) and existential (any) types?
Correct! Well done.
Incorrect.
The correct answer is B) some is a compile-time single specific type (statically resolved); any is a runtime-boxed type (dynamically dispatched)
B
Correct Answer
some is a compile-time single specific type (statically resolved); any is a runtime-boxed type (dynamically dispatched)
Explanation
some View has static type identity — the compiler knows the exact type. any View boxes any conforming type at runtime with dynamic dispatch overhead.
Progress
67/100