Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Arrow up icon
GO TO TOP
Mastering Swift 6

You're reading from   Mastering Swift 6 Modern programming techniques for high-performance apps in Swift 6.2

Arrow left icon
Product type Paperback
Published in Aug 2025
Publisher Packt
ISBN-13 9781836203698
Length 378 pages
Edition 7th Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Jon Hoffman Jon Hoffman
Author Profile Icon Jon Hoffman
Jon Hoffman
Arrow right icon
View More author details
Toc

Table of Contents (25) Chapters Close

Preface 1. The Evolution of Swift FREE CHAPTER 2. Closures and Result Builders 3. Protocols and Protocol Extensions 4. Generics 5. Value and Reference Types 6. Enumerations 7. Reflection 8. Error Handling and Availability 9. Regular Expressions 10. Custom Subscripting 11. Property Observers and Wrappers 12. Dynamic Member Lookup and Key Paths 13. Grand Central Dispatch 14. Structured Concurrency 15. Memory Management 16. Advanced and Custom Operators 17. Access Controls 18. Swift Testing 19. Object-Oriented Programming 20. Protocol-Oriented Programming 21. Functional Programming with Swift 22. Unlock Your Book’s Exclusive Benefits 23. Other Books You May Enjoy
24. Index

Join our book community on Discord

https://packt.link/ios-Swift

Protocol-Oriented Programming (POP) is a software design paradigm which focuses on using protocols to define methods, properties, and other requirements for types. Unlike Object-Oriented Programming (OOP), which we saw in Chapter 19 Object Oriented Programming which relies on class inheritance, POP encourages the use of protocols to create flexible and reusable components.

One of the key advantages of POP is its ability to reduce the tight coupling that often found in class hierarchies. By defining protocols, developers can specify a set of requirements that types must conform to, without dictating how these requirements should be implemented.

Swift's standard library is built using a protocol-oriented design, showcasing the effectiveness of this design philosphy. Many core types within Swift, such as collections and numeric types, conform to protocols that define their essential behaviors. This design allows for...

lock icon The rest of the chapter is locked
Visually different images
CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Mastering Swift 6
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime
Modal Close icon
Modal Close icon