Swift Style: An Opinionated Guide to an Opinionated Language
暫譯: Swift 風格:對一種有主見語言的有主見指南
Erica Sadun
- 出版商: Pragmatic Bookshelf
- 出版日期: 2017-05-09
- 售價: $1,020
- 貴賓價: 9.5 折 $969
- 語言: 英文
- 頁數: 226
- 裝訂: Paperback
- ISBN: 1680502352
- ISBN-13: 9781680502350
-
相關分類:
Apple Developer
立即出貨 (庫存=1)
買這商品的人也買了...
-
$980$980 -
$950$903 -
$200$190 -
$680$537 -
$948OpenCV 3 Blueprints (Paperback)
-
$2,450$2,450 -
$880$836 -
$320$253 -
$1,400$1,330 -
$1,380Learn FileMaker Pro 16: The Comprehensive Guide to Building Custom Databases
-
$520$442 -
$2,210$2,100 -
$1,425$1,350 -
$480$379
相關主題
商品描述
Discover the do's and don'ts involved in crafting readable Swift code as you explore common Swift coding challenges and the best practices that address them. From spacing, bracing, and semicolons to proper API style, discover the whys behind each recommendation, and add to or establish your own house style guidelines. This practical, powerful, and opinionated guide offers the best practices you need to know to work successfully in this equally opinionated programming language.
Apple's Swift programming language has finally reached stability, and developers are demanding to know how to program the language properly. Swift Style guides you through the ins and outs of Swift programming best practices. This is the first best practices book for serious, professional Swift programmers and for programmers who want to shine their skills to be hired in this demanding market.
A style guide offers a consistent experience of well-crafted code that lets you focus on the code's underlying meaning, intent, and implementation. This book doesn't offer canonical answers on Swift coding style. It explores the areas of Swift where structure comes into play. Whether you're developing a personal style or a house style, there are always ways to enhance your code choices. You'll find here the ideas and principles to establish or enhance your own best style practices.
Begin with simple syntactical styling. Strengthen code bracing for easy readability. Style your closures for safety and resilience. Perfect spacing and layout. Master literal initialization and typing. Optimize control flow layout and improve conditional style choices. Transition from Objective-C and move code into Swift the right way. Boost API design using proper naming and labeling. Elevate defaulted arguments and variadics to their right places. Finally, Erica offers her own broad recommendations on good coding practice.
What You Need:
Recent version of the Swift programming language
商品描述(中文翻譯)
發現撰寫可讀性高的 Swift 代碼的注意事項與禁忌,探索常見的 Swift 編碼挑戰及其最佳實踐。從空格、括號和分號到正確的 API 風格,了解每項建議背後的原因,並增補或建立您自己的風格指南。這本實用、強大且具主觀性的指南提供了您在這種同樣具主觀性的程式語言中成功工作的最佳實踐。
蘋果的 Swift 程式語言終於達到了穩定性,開發者渴望了解如何正確地編寫這種語言。Swift Style 將引導您了解 Swift 編程最佳實踐的方方面面。這是針對認真且專業的 Swift 程式設計師以及希望在這個競爭激烈的市場中展現技能的程式設計師的第一本最佳實踐書籍。
風格指南提供了一致的精心編寫代碼的體驗,讓您專注於代碼的基本含義、意圖和實現。這本書並不提供 Swift 編碼風格的權威答案,而是探索 Swift 中結構發揮作用的領域。無論您是在發展個人風格還是公司風格,總有方法可以增強您的代碼選擇。您將在這裡找到建立或增強您自己最佳風格實踐的想法和原則。
從簡單的語法風格開始。加強代碼的括號使用以提高可讀性。為您的閉包設計安全且具彈性的風格。完美的空格和佈局。掌握字面初始化和類型。優化控制流佈局並改善條件風格選擇。從 Objective-C 過渡,正確地將代碼轉移到 Swift。使用正確的命名和標籤提升 API 設計。將預設參數和可變參數提升到正確的位置。最後,Erica 提出了她對良好編碼實踐的廣泛建議。
您需要的:
最近版本的 Swift 程式語言