Protocols let you define what a type can do without caring about what it actually is. Once that clicks, a huge chunk of Swift and SwiftUI ...
For further actions, you may consider blocking this person and/or reporting abuse
Solid mobile content. We built an AI tools web app (tools.shopveigo.com) that works well on mobile β image toolbox, headshots, resume optimizer. Used PWA approach instead of native. Would be curious to hear your take on PWA vs native for AI tools.
Thanks for reading! The series is focused on native Swift/iOS for now so PWA comparisons are a bit outside the current scope, but an interesting topic for another time.
Makes total sense to keep the series focused on native Swift and iOS fundamentals first. Mastering protocols is definitely the right foundation before branching out into cross-platform web comparisons. Looking forward to seeing how native iOS handles those AI tool integrations down the line.
Thanks! AI integration is definitely on the roadmap as the series gets into more advanced topics.
Abstracting machine learning model implementations behind custom protocols using CoreML sounds like a perfect fit for those advanced topics. It will be interesting to see how protocol-oriented design handles the specific constraints and data pipelines typical of AI frameworks.
That's a really interesting angle I hadn't thought about specifically, using protocols to abstract CoreML model implementations so you can swap models without changing the rest of the code. It's exactly the kind of real-world use case that makes protocol-oriented design click beyond the textbook examples. Definitely something to keep in mind for when the series gets into more advanced topics.
Nice explanation. One small suggestion: since modern Swift encourages explicit existentials, it might be worth updating the examples to use any Fighter instead of just Fighter. It would also be interesting to add a short note about when youβd choose any Fighter versus a generic constraint (), since thatβs usually the next question readers have after learning protocols.
Really good points, thank you! The any keyword for existentials is something I deliberately left out here to keep the introduction focused on the core concept, but you're right that it's worth flagging since the compiler will warn about bare protocol types in modern Swift. The any Fighter vs generic constraint distinction is exactly the next question, and it's a meaty enough topic to deserve its own treatment rather than a footnote. Will make sure it gets proper coverage when the series gets to generics. Appreciate the careful read as always!