Advanced Swift Updated for Swift 3 Год издания: 2006 Автор: Chris Eidhof, Ole Begemann, Airspeed Velocity Издательство: CreateSpace Independent Publishing Platform Язык: Английский Формат: PDF Качество: Распознанный текст без ошибок (OCR) Интерактивное оглавление: Да Описание: Advanced Swift takes you through Swift’s features, from low-level programming to high-level abstractions. In this book, we’ll write about advanced concepts in Swift programming. If you have read the Swift Programming Guide, and want to explore more, this book is for you. Swift is a great language for systems programming, but also lends itself for very high-level programming. We’ll explore both high-level topics (for example, programming with generics and protocols), as well as low-level topics (for example, wrapping a C library and string internals).
Оглавление
1 Introduction Who Is This Book For? 8 Themes 8 Terminology 12 Swift Style Guide 16 2 Built-In Collections Arrays 19 Dictionaries 37 Sets 42 Ranges 46 3 Collection Protocols Sequences 50 Collections 62 Conforming to Collection 66 Indices 73 Slices 87 Specialized Collections 94 Conclusion 103 4 Optionals Sentinel Values 105 Solving the Magic Value Problem with Enumerations 107 A Tour of Optional Techniques 109 When to Force-Unwrap 135 Living Dangerously: Implicit Optionals 139 Conclusion 140 5 Structs and Classes Value Types 142 Mutability 145 Structs 148 Copy-On-Write 156 Closures and Mutability 164 Memory 166 Closures and Memory 171 Conclusion 174 6 Functions Flexibility through Functions 183 Local Functions and Variable Capture 193 Functions as Delegates 196 inout Parameters and Mutating Methods 201 Properties and Subscripts 206 Automatic Closures 211 The @escaping Annotation 213 Conclusion 215 7 Strings No More Fixed Width 217 Strings and Collections 221 A Simple Regular Expression Matcher 227 ExpressibleByStringLiteral 231 Internal Structure of String 233 Code Unit Views 241 CustomStringConvertible and CustomDebugStringConvertible 243 Text Output Streams 245 String Performance 250 Outlook 254 8 Error Handling The Result Type 257 Throwing and Catching 258 Typed Errors 261 Bridging Errors to Objective-C 262 Errors and Function Parameters 263 Cleaning Up Using defer 266 Errors and Optionals 268 Chaining Errors 269 Higher-Order Functions and Errors 270 Conclusion 273 9 Generics Overloading 275 Operating Generically on Collections 284 Designing with Generics 298 How Generics Work 302 Conclusion 307 10 Protocols Protocol-Oriented Programming 311 Two Types of Protocols 316 Protocols with Self Requirements 322 Protocol Internals 325 Conclusion 327 11 Interoperability Hands-On: Wrapping CommonMark 329 An Overview of Low-Level Types 342 Function Pointers 345
Примеры страниц
[only-soft.org].t74721.torrent
Торрент:
Зарегистрирован
[ 2017-12-02 19:30 ]
2 KB
Статус:
√проверено
Скачан:
5 раз
Размер:
5 MB
Оценка:
(Голосов: 0)
Поблагодарили:
0
Chris Eidhof, Ole Begemann, Airspeed Velocity - Advanced Swift Updated for Swift 3 [2006, PDF, ENG] скачать торрент бесплатно и без регистрации
Вы не можете начинать темы Вы не можете отвечать на сообщения Вы не можете редактировать свои сообщения Вы не можете удалять свои сообщения Вы не можете голосовать в опросах Вы не можете прикреплять файлы к сообщениям Вы можете скачивать файлы