General topic questions
Protocol Extensions
MediumCommon
Free section · general topics & algorithms
What can and can’t protocol extensions do? How do they relate to default implementations?
Reveal model answer
Extensions can add methods/computed properties with defaults, but can’t add stored properties. Default implementations let conforming types opt into behavior without boilerplate; dispatch is static unless requirements are protocol witnesses.