My Account Log in

1 option

Mastering Swift 6 : Modern Programming Techniques for High-Performance Apps in Swift 6. 2.

O'Reilly Online Learning: Academic/Public Library Edition Available online

O'Reilly Online Learning: Academic/Public Library Edition
Format:
Book
Author/Creator:
Hoffman, Jon.
Language:
English
Subjects (All):
Swift (Computer program language).
Application software--Development.
Physical Description:
1 online resource (0 pages)
Edition:
1st ed.
Place of Publication:
Birmingham : Packt Publishing, Limited, 2025.
System Details:
Mode of access: World Wide Web.
Summary:
Dive into Swift 6 with this comprehensive guide designed to enhance your application development skills. Master advanced techniques such as concurrency and memory management while exploring the latest Swift 6 features to create scalable and high-performance applications effortlessly. What this Book will help me do Gain a deep understanding of advanced Swift 6 features to make your code more powerful and efficient. Learn to use concurrency to optimize application performance on modern platforms. Master the intricacies of memory management within Swift for better resource handling. Adopt best practices in Swift programming to write clean, scalable, and maintainable code. Explore new Swift features such as result builders and custom operators to expand your development toolkit. Author(s) Authored by Jon Hoffman, a seasoned software engineer and programmer with extensive experience in the Apple ecosystem. Having written multiple books on Swift, Jon focuses on practical and actionable advice for developers to enhance their skills. Jon combines deep technical knowledge with a clear and approachable writing style to make complex concepts accessible. Who is it for? This book is perfect for developers with intermediate Swift knowledge looking to advance their skills. Ideal for programmers aiming to optimize performance and implement best practices in their Swift applications. Whether targeting deployment on iOS, macOS, or Linux platforms, you'll find this guide invaluable. If you're keen to explore Swift's powerful modern features, start here.
Contents:
Cover
Title Page
Copyright Page
Contributors
Table of Contents
Preface
Chapter 1: The Evolution of Swift
Getting the most out of this book - get to know your free benefits
How Swift has evolved
Swift was born
Swift evolved
What's new with Swift 6?
Migrating existing projects to Swift 6
How swift.org can help you
Comprehensive documentation and guides
The Swift standard library and Core Libraries
The Swift Package Manager
Continuous integration and source compatibility
Contributing to Swift
A thriving community
Summary
Chapter 2: Closures and Result Builders
Introducing closures
Simple closures
Shorthand syntax for closures
Using closures with Swift arrays
Multiple trailing closures
Advanced closures example
Result builders
Chapter 3: Protocols and Protocol Extensions
Protocols as types
Polymorphism with protocols
Typecasting with protocols
Using protocols with enumerations
Protocol extensions
Any and any
Uppercase "Any"
Existential "any" in Swift
Adopting protocols using a synthesized implementation
Chapter 4: Generics
Introducing generics
Generic functions
Defining generic functions
Calling generic functions
Type constraints
Generic types
Conditionally adding extensions with generics
Conditionally adding functions
Conditional conformance
Generic subscripts
Associated types
Implicitly opened existentials
Chapter 5: Value and Reference Types
Value types and reference types
inout parameters and value types
Noncopyable types
Recursive data types for reference types
Inheritance for reference types
Dynamic dispatch
Copy-on-write
Creating a backend storage type
Creating a Queue type
Using the Queue type
Summary.
Chapter 6: Enumerations
Raw values
Associated values
Pattern matching
Enumeration iteration
Going beyond basic values
Chapter 7: Reflection
Reflection and the Mirror API
Getting started with the Mirror API
CustomReflectable protocol
Serializing objects
Chapter 8: Error Handling and Availability
Native error handling
Representing errors
Throwing errors
Catching errors
Using the do-catch block
Using multiple catch statements
Using error propagation
Using a forced-try expression
Using an optional try
The LocalizedError protocol
Defer functions
Multi-pattern catch clauses
Typed throws
The availability attribute
Unavailability
Chapter 9: Regular Expressions
How regular expressions are built
Literals
Metacharacters
Quantifiers
Anchors
Modifiers
Character classes
Grouping and capturing
Assertions
Regular expression literals
Regex type
RegexBuilder
Converting regular expressions to RegexBuilder format
Transform a match with RegexBuilder
Capture a match with RegexBuilder
Chapter 10: Custom Subscripting
Introducing subscripts
Subscripts with Swift arrays
Creating and using custom subscripts
Read-only custom subscripts
Calculated subscripts
Subscript values
Static subscripts
External names for subscripts
Multidimensional subscripts
Extending types with subscripts
When not to use a custom subscript
Chapter 11: Property Observers and Wrappers
Introducing property observers
Using property observers
Introducing property wrappers
Using property wrappers
Projected values
Observation of values
Chapter 12: Dynamic Member Lookup and Key Paths
Dynamic member lookup
Key paths
Understanding key paths.
Static properties
Key paths in functions
The map and filter functions with key paths
Using key paths and dynamic member lookups together
Chapter 13: Grand Central Dispatch
Concurrency and parallelism
GCD
Creating functions for our queues
Creating queues
Creating and using a concurrent queue
Creating and using a serial queue
Executing code on the main queue function
async versus sync methods with GCD
Using asyncAfter
Dispatch groups
DispatchWorkItem
DispatchTime
DispatchWallTime
Barriers
Dispatch semaphores
Chapter 14: Structured Concurrency
Data race conditions and Swift 6
Asynchronous functions
async and await
Calling multiple asynchronous functions
Tasks
Detaching tasks
Canceling tasks
Starting a task synchronously
Task naming
Task groups
Actors
Global actors
Sendable types
Adapting completion handlers to async/await
Strict concurrency checking
Default actor isolation
Chapter 15: Memory Management
Introducing ARC
How ARC works
Strong reference cycles
Unowned references
Weak references
Retain cycles and closures
InlineArray
Chapter 16: Advanced and Custom Operators
Bits and bytes
Endianness
Bitwise operators
Printing binary numbers
The bitwise AND operator
The bitwise OR operator
The bitwise XOR operator
The bitwise NOT operator
Bitwise shift operators
BinaryInteger extension
Overflow operators
Operator methods
Custom operators
Chapter 17: Access Controls
Introducing access control
Access control levels
Open access
Public access
Internal access
File-private access
Private access
Access levels with enumerations
Access levels for getters and setters
Best practices for access control.
Use the most restrictive access level by default
Encapsulate implementation details
Use extensions wisely
Maintain consistency
Chapter 18: Swift Testing
Getting started with Swift Testing
Adding Swift Testing to an existing Xcode project
Adding Swift Testing to an existing Swift Package Manager project
Building blocks for Swift Testing
Declaring the @Test function
Expectations
#require macro
Confirmations
Exit tests
Traits
Suites
Swift Testing example
Creating our calculator
Using the @testable attribute
Testing our calculator
Chapter 19: Object-Oriented Programming
What is OOP?
Requirements for the example code
Using object-oriented design
Visualizing our class hierarchy
Forming our object-oriented design
Using our vehicle types
Issues with the object-oriented design
Chapter 20: Protocol-Oriented Programming
What is POP?
Requirements for the sample code
Using POP
Visualizing our protocol-oriented design
Forming our protocol-oriented design
Protocol inheritance
Protocol composition
Protocol-oriented design
Swift standard library
Chapter 21: Functional Programming with Swift
Core principles of functional programming
Immutability
Pure functions
First-class functions
Higher-order functions
Advanced functional programming techniques
Function composition
Currying
Recursion
Chapter 22: Unlock Your Book'sExclusive Benefits
How to unlock these benefits in three easy steps
Packt Page
Other Books You May Enjoy
Index.
Notes:
Includes index.
Includes bibliographical references and index.
Description based on publisher supplied metadata and other sources.
ISBN:
1-83620-368-3
OCLC:
1532841456

The Penn Libraries is committed to describing library materials using current, accurate, and responsible language. If you discover outdated or inaccurate language, please fill out this feedback form to report it and suggest alternative language.

We want your feedback!

Thanks for using the Penn Libraries new search tool. We encourage you to submit feedback as we continue to improve the site.

My Account

Shelf Request an item Bookmarks Fines and fees Settings

Guides

Using the Library Catalog Using Articles+ Library Account