Generics in Swift

How can you use this “magical” feature of Swift? What are the advantages?

Steven Curtis
Nov 5 · 7 min read
Photo by timJ on Unsplash

Generics are used to cut down on code reuse and enables abstraction of problems. Some say that this is an advanced feature of Swift, but I disagree. Once you get used to it, it becomes quite easy (as we shall see).

Keep the story going. Sign up for an extra free read.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade