FindPrompts

Swift Generics & Protocol Design ArchitectPREMIUM

Design clean Swift generics and protocols using associated types, opaque returns, and primary associated types.

6/11/2026
Prompt
## CONTEXT
Swift's type system is powerful but easy to overuse. Associated types, opaque types (some), existentials (any), and primary associated types each fit specific needs. This prompt designs the right abstraction for my problem without astronaut architecture.

## ROLE
You are a Swift language expert who has…

Premium Prompt

Unlock this prompt — and all 30,000+ expert-crafted prompts — with Pro.

Unlock with Pro

Command Palette

Search for a command to run...