Swift for the Really Impatient Paperback
暫譯: 對於非常不耐煩的 Swift 讀者
Matt Henderson, Dave Wood
- 出版商: Addison Wesley
- 出版日期: 2014-12-24
- 售價: $1,350
- 貴賓價: 9.5 折 $1,283
- 語言: 英文
- 頁數: 176
- 裝訂: Paperback
- ISBN: 0133960129
- ISBN-13: 9780133960129
-
相關分類:
Apple Developer
海外代購書籍(需單獨結帳)
相關主題
商品描述
Through expert code examples and crystal-clear explanations, Henderson and Wood reveal how Swift features improve on Objective-C and show how to make the most of them. You’ll quickly master “Swift-er” techniques for using objects, classes, optionals, generics, functions, closures, and more. Each chapter includes hands-on exercises designed to reinforce and deepen your skills.
You’ll learn how to re-implement common Objective-C programming solutions in Swift, improving code clarity, power, and performance on both desktop and mobile devices. And, because you probably won’t (or can’t) abandon Objective-C anytime soon, you’ll discover how to use both languages together, smoothly integrate Swift into existing projects and workflows, and gradually move your current code base into the future. Coverage includes
- Using Swift’s new patterns and concise, expressive syntax to produce safer, more reliable code
- Leveraging the surprising power of Swift’s data structures
- Utilizing Swift’s type system to help prevent errors common in other languages
- Using optionals to correctly handle invalid, missing, or unknown values
- Implementing generics to reduce duplication, improve power, and simplify maintenance
- Interacting with C and Objective-C APIs
- Abstracting functionality for reusable code while maintaining type safety
- Isolating code in clean, flexible, low-overhead closures
- Combining Swift with Objective-C in the same project
- Avoiding gotchas when importing Objective-C classes in Swift projects
- Nesting types to improve code clarity
- Creating shared objects with singletons
- Managing threading and concurrency with Swift’s advanced Grand Central Dispatch (GCD) patterns
商品描述(中文翻譯)
《Swift for the Really Impatient》是每位有經驗的 Objective-C 開發者學習 Swift 語言的完美起點。領先的 iOS 和 OS X 開發者 Matt Henderson 和 Dave Wood 將幫助你充分利用 Swift 的強大創新,而不必浪費時間在你已經熟悉的基礎知識上。
透過專業的程式碼範例和清晰的解釋,Henderson 和 Wood 揭示了 Swift 的特性如何改善 Objective-C,並展示如何充分利用這些特性。你將迅速掌握使用物件、類別、選擇性、泛型、函數、閉包等的「Swift-er」技術。每一章都包含旨在加強和深化你技能的實作練習。
你將學會如何在 Swift 中重新實現常見的 Objective-C 程式設計解決方案,提升程式碼的清晰度、效能和性能,無論是在桌面還是移動設備上。而且,因為你可能不會(或無法)在短期內放棄 Objective-C,你將發現如何將這兩種語言結合使用,順利地將 Swift 整合到現有的專案和工作流程中,並逐步將你目前的程式碼基礎移向未來。內容涵蓋:
- 使用 Swift 的新模式和簡潔、表達力強的語法來產生更安全、更可靠的程式碼
- 利用 Swift 的資料結構的驚人威力
- 利用 Swift 的類型系統來幫助防止其他語言中常見的錯誤
- 使用選擇性來正確處理無效、缺失或未知的值
- 實作泛型以減少重複、提升效能並簡化維護
- 與 C 和 Objective-C API 互動
- 抽象功能以實現可重用的程式碼,同時保持類型安全
- 在乾淨、靈活、低開銷的閉包中隔離程式碼
- 在同一專案中結合 Swift 和 Objective-C
- 在 Swift 專案中導入 Objective-C 類別時避免常見陷阱
- 嵌套類型以改善程式碼的清晰度
- 使用單例創建共享物件
- 使用 Swift 的先進 Grand Central Dispatch (GCD) 模式管理執行緒和併發性