📘 Pro Swift
A guide for experienced Swift developers looking to deepen their understanding of the language and its capabilities. This book covers advanced Swift programming techniques, focusing on writing clean, efficient, and idiomatic Swift code.
Details
URL: 🔗 https://www.hackingwithswift.com/store/pro-swift
Published: May 26, 2019
Authors: Paul Hudson
Tags:
Swift
, Advanced Programming
, iOS Development
, Functional Programming
, Patterns
Key Points
- Advanced Swift programming techniques
- Focus on idiomatic Swift and performance optimization
- Practical examples and hands-on exercises
- Topics include functional programming, protocol-oriented programming, and more
- Suitable for developers with prior Swift experience
Summary of Contents
-
Preface:
- Introduction to the book's purpose and target audience
- Encouragement to engage with practical examples and exercises
-
Chapter 1: Syntax
- Pattern Matching: Using switch statements and pattern matching in Swift
- Nil Coalescing: Handling optionals with the nil coalescing operator
- Guard: Using guard statements for early exits and improved readability
- Lazy Loading: Lazy properties and methods for performance optimization
- Destructuring: Destructuring tuples for cleaner code
- Labeled Statements: Using labels for better control in loops and conditionals
- Nested Types: Logical grouping with nested functions, classes, and structs
-
Chapter 2: Types
- Useful Initializers: Advanced initializer techniques
- Enums: Using enums effectively with associated values
- Collections: Working with arrays, dictionaries, and sets
- Generics: Creating reusable and type-safe code with generics
-
Chapter 3: References and Values
- Closures: Understanding closures and their behavior as references
- Structs vs. Classes: Choosing the right type and understanding value vs. reference semantics
- Immutability: Benefits of immutable data and how to implement it
-
Chapter 4: Functions
- Variadic Functions: Creating functions that accept variable numbers of arguments
- Operator Overloading: Defining custom operators for intuitive code
- Advanced Closures: Techniques for using closures effectively
-
Chapter 5: Errors
- Error Handling: Swift's error handling model
- Throwing Functions: Using and propagating throwing functions
- Assertions and Fatal Errors: Using assertions and handling critical errors
-
Chapter 6: Functional Programming
- map(), flatMap(), filter(): Functional programming techniques in Swift
- Reduce and Sorting: Using reduce for aggregation and custom sorting
- Lazy Functions: Optimizing performance with lazy evaluation
- Functors and Monads: Advanced functional programming concepts
-
Chapter 7: Patterns
- OOP and POP: Object-oriented and protocol-oriented programming
- Architectural Patterns: Using MVC, MVVM, and other patterns in Swift
- Command-line Swift: Building command-line tools with Swift
Conclusion
- Encourages continuous learning and exploration of advanced Swift concepts
- Emphasizes the importance of writing clean, efficient, and idiomatic Swift code
Link to Book→