Swift for Programmers (Paperback)
暫譯: 程式設計師的 Swift

Paul J. Deitel, Harvey Deitel

  • 出版商: Prentice Hall
  • 出版日期: 2015-02-01
  • 售價: $1,710
  • 貴賓價: 9.5$1,625
  • 語言: 英文
  • 頁數: 400
  • 裝訂: Paperback
  • ISBN: 0134021363
  • ISBN-13: 9780134021362
  • 相關分類: Apple Developer
  • 已絕版

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

商品描述

The professional programmer’s Deitel® guide to Apple’s new Swift programming language for the iOS® and OS X® platforms

 

Written for programmers with a background in object-oriented programming in a C-based language like Objective-C, Java, C# or C++, this book applies the Deitel signature live-code approach with scores of complete, working, real-world programs to explore the new Swift language in depth. The code examples feature syntax shading, code highlighting, rich commenting, line-by-line code walkthroughs and live program outputs. The book features thousands of lines of proven Swift code, and tips that will help you build robust applications.

 

Start with an introduction to Swift using an early classes and objects approach, then rapidly move on to more advanced topics. When you master the material, you’ll be ready to build industrial-strength object-oriented Swift applications.


About This Book

 

The Swift programming language was arguably the most significant announcement at Apple’s 2014 Worldwide Developers Conference. Although apps can still be developed in Objective-C®, Apple says that Swift is its applications programming and systems programming language of the future.

 

Swift is a contemporary language with simpler syntax than Objective-C. Because Swift is new, its designers were able to include popular programming language features from languages such as Objective-C, Java, C#, Ruby, Python® and many others. These features include automatic reference counting (ARC), type inference, optionals, String interpolation, tuples, closures (lambdas), extensions, generics, operator overloading, functions with multiple return values, switch statement enhancements and more. We’ve been able to develop apps more quickly in Swift than with Objective-C and the code is shorter, clearer and runs faster on today’s multi-core architectures.

 

Swift also eliminates the possibility of many errors common in other languages, making your code more robust and secure. Some of these error-prevention features include no implicit conversions, ARC, no pointers, required braces around every control statement’s body, assignment operators that do not return values, requiring initialization of all variables and constants before they’re used, array bounds checking, automatic checking for overflow of integer calculations, and more. You can combine Swift and Objective-C in the same app to enhance existing Objective-C apps without having to rewrite all the code. Your apps will easily be able to interact with the Cocoa®/Cocoa Touch® frameworks, which are largely written in Objective-C.

 

You can also use the new Xcode playgrounds with Swift. A playground is an Xcode window in which you can enter Swift code that compiles and executes as you type it. This allows you to see and hear your code’s results as you write it, quickly find and fix errors, and conveniently experiment with features of Swift and the Cocoa/Cocoa Touch frameworks.

 

Practical, Example-Rich Coverage of:

  • Classes, Objects, Methods, Properties
  • Initializers, Deinitializers, Bridging
  • Tuples, Array and Dictionary Collections
  • Structures, Enumerations, Closures, ARC
  • Inheritance, Polymorphism, Protocols
  • Type Methods, Type Properties
  • Generics; Strings and Characters
  • Operator Overloading, Operator Functions, Custom Operators, Subscripts
  • Access Control; Type Casting and Checking
  • Nested Types, Nested Methods
  • Optionals, Optional Chaining, Extensions
  • Xcode, Playgrounds, Intro to Cocoa Touch® with a Fully Coded iOS® 8 Tip Calculator App
  • Overflow Operators, Attributes, Patterns
  • More topics online

 

Visit www.deitel.com

  • Download code examples
  • For information on Deitel’s Dive Into® Series programming training courses delivered at organizations worldwide visit www.deitel.com/training or to deitel@deitel.com
  • Join the Deitel social networking communities on Facebook® at facebook.com/DeitelFan, Twitter® at @deitel, Google+ at google.com/+DeitelFan, LinkedIn® at bit.ly/DeitelLinkedIn, YouTube™ at youtube.com/user/DeitelTV and subscribe to the Deitel® Buzz Online e-mail newsletter at www.deitel.com/newsletter/ subscribe.html

 

商品描述(中文翻譯)

專業程式設計師的 Deitel® 指南:Apple 新的 Swift 程式語言,適用於 iOS® 和 OS X® 平台

這本書是為具有物件導向程式設計背景的程式設計師所撰寫,特別是使用 C 語言基礎的語言,如 Objective-C、Java、C# 或 C++。本書採用 Deitel 簽名的即時程式碼方法,提供大量完整、可運行的實際程式,深入探索新的 Swift 語言。程式碼範例具有語法著色、程式碼高亮、豐富的註解、逐行程式碼逐步解說和即時程式輸出。本書包含數千行經過驗證的 Swift 程式碼,以及幫助您構建穩健應用程式的提示。

從使用早期類別和物件的方法介紹 Swift 開始,然後迅速進入更高級的主題。當您掌握這些內容後,您將準備好構建工業級的物件導向 Swift 應用程式。

關於本書

Swift 程式語言無疑是 Apple 2014 年全球開發者大會上最重要的公告。儘管仍然可以使用 Objective-C® 開發應用程式,但 Apple 表示 Swift 是其未來的應用程式程式設計和系統程式設計語言。

Swift 是一種現代語言,其語法比 Objective-C 更簡單。由於 Swift 是新語言,其設計者能夠從 Objective-C、Java、C#、Ruby、Python® 等多種語言中引入流行的程式語言特性。這些特性包括自動引用計數 (ARC)、類型推斷、可選型、字串插值、元組、閉包 (lambdas)、擴展、泛型、運算子重載、具有多個返回值的函數、switch 語句增強等。我們能夠比使用 Objective-C 更快地開發應用程式,且程式碼更短、更清晰,並在當今的多核心架構上運行更快。

Swift 還消除了許多其他語言中常見的錯誤的可能性,使您的程式碼更穩健和安全。其中一些錯誤預防特性包括沒有隱式轉換、ARC、沒有指標、每個控制語句主體周圍需要大括號、賦值運算子不返回值、要求在使用之前初始化所有變數和常數、數組邊界檢查、自動檢查整數計算的溢出等。您可以在同一應用程式中結合 Swift 和 Objective-C,以增強現有的 Objective-C 應用程式,而無需重寫所有程式碼。您的應用程式將能夠輕鬆與主要用 Objective-C 編寫的 Cocoa®/Cocoa Touch® 框架互動。

您還可以使用新的 Xcode playgrounds 與 Swift。Playground 是一個 Xcode 窗口,您可以在其中輸入 Swift 程式碼,該程式碼會在您輸入時編譯和執行。這使您能夠在編寫程式碼時即時查看和聽到程式碼的結果,快速找到並修正錯誤,並方便地實驗 Swift 和 Cocoa/Cocoa Touch 框架的特性。

實用的、範例豐富的內容涵蓋:

- 類別、物件、方法、屬性
- 初始化器、去初始化器、橋接
- 元組、數組和字典集合
- 結構、列舉、閉包、ARC
- 繼承、多型、協定
- 類型方法、類型屬性
- 泛型;字串和字符
- 運算子重載、運算子函數、自定義運算子、下標
- 存取控制;類型轉換和檢查
- 嵌套類型、嵌套方法
- 可選型、可選鏈接、擴展
- Xcode、Playgrounds、Cocoa Touch® 的介紹,包含完整編碼的 iOS® 8 小費計算器應用程式
- 溢出運算子、屬性、模式
- 更多主題在線上

訪問 www.deitel.com

- 下載程式碼範例
- 有關 Deitel 的 Dive Into® 系列程式設計培訓課程的資訊,請訪問 www.deitel.com/training 或發送電子郵件至 deitel@deitel.com
- 加入 Deitel 的社交網絡社群,Facebook® 在 facebook.com/DeitelFan,Twitter® 在 @deitel,Google+ 在 google.com/+DeitelFan,LinkedIn® 在 bit.ly/DeitelLinkedIn,YouTube™ 在 youtube.com/user/DeitelTV,並訂閱 Deitel® Buzz 在線電子郵件通訊,網址為 www.deitel.com/newsletter/subscribe.html

最後瀏覽商品 (20)