Swift Pocket Reference (Paperback)
暫譯: Swift 口袋參考手冊 (平裝本)

Anthony Gray

  • 出版商: O'Reilly
  • 出版日期: 2014-12-21
  • 售價: $810
  • 貴賓價: 9.5$770
  • 語言: 英文
  • 頁數: 186
  • 裝訂: Paperback
  • ISBN: 1491915420
  • ISBN-13: 9781491915424
  • 相關分類: Apple Developer
  • 已過版

買這商品的人也買了...

商品描述

Get quick answers for developing and debugging applications with Swift, Apple’s multi-paradigm programming language. This pocket reference is the perfect on-the-job tool for learning Swift’s modern language features, including type safety, generics, type inference, closures, tuples, automatic memory management, and support for Unicode.

Designed to work with Cocoa and Cocoa Touch, Swift can be used in tandem with Objective-C, and either of these languages can call APIs implemented in the other. Swift is still evolving, but it’s clear that Apple sees it as the future language of choice for iOS and OS X software development.

Topics include:

  • Swift’s Run-Eval-Print-Loop (REPL) and interactive playgrounds
  • Supported data types, such as strings, arrays, and dictionaries
  • Variables and constants
  • Program flow: loops and conditional execution
  • Classes, structures, enumerations, functions, and protocols
  • Closures: similar to blocks in Objective-C and lambdas in C#
  • Optionals: values that can explicitly have no value
  • Operators, operator overloading, and custom operators
  • Access control: restricting access to types, methods, and properties
  • Built-in global functions and their parameter requirements

商品描述(中文翻譯)

獲得快速答案以開發和除錯使用 Swift 的應用程式,Swift 是蘋果公司的多範式程式語言。這本口袋參考書是學習 Swift 現代語言特性的完美工作工具,包括類型安全、泛型、類型推斷、閉包、元組、自動記憶體管理和對 Unicode 的支援。

Swift 設計用於與 Cocoa 和 Cocoa Touch 一起使用,可以與 Objective-C 一起使用,這兩種語言可以互相調用對方實現的 API。Swift 仍在不斷發展,但顯然蘋果將其視為 iOS 和 OS X 軟體開發的未來首選語言。

主題包括:
- Swift 的運行-評估-打印-循環 (REPL) 和互動式遊樂場
- 支援的資料類型,如字串、陣列和字典
- 變數和常數
- 程式流程:迴圈和條件執行
- 類別、結構、列舉、函數和協定
- 閉包:類似於 Objective-C 的區塊和 C# 的 Lambda
- 可選型別:可以明確沒有值的值
- 運算子、運算子重載和自定義運算子
- 存取控制:限制對類型、方法和屬性的存取
- 內建全域函數及其參數要求