Swift (程式語言)

出自維基百科,自由嘅百科全書
Swift
編程範式範式物件導向泛函指令式組塊英文Block_(programming)結構化
設計者克里斯·拉特納同埋蘋果公司
編程員蘋果公司
第一次出現2014年6月2號, 9年之前 (2014-06-02)[1]
穩定版本
5.10[2] 喺維基數據度改 / 2024年3月5號,20日之前
預覽版本
5.7分支(仲有之後出嘅Swift 6)
類型系統靜態、強型別類型推論
操作系統蘋果公司嘅作業系統(Darwin, iOS, iPadOS, macOS, tvOS, watchOS), Linux, Windows, Android
軟件授權Apache許可證2.0(Swift 2.2及以後版本)
專有(直到Swift 2.2)[3][4]
副檔名.swift
網站
啟發語言
Objective-CRustHaskellRubyPythonC#CLU[5],同埋D語言[6]

Swift係一隻電腦程式語言,由蘋果公司推出,用嚟編寫OS XiOS應用程式,2014年6月響Apple WWDC公開,2015年6月響WWDC宣佈開源。設計Swift嗰時,蘋果公司有意將Swift同埋Objective-C共存喺蘋果共事嘅作業系統度。

歷史[編輯]

2010年7月,蘋果公司開發者工具部門總監克里斯·拉特納開始進行Swift程式語言嘅設計工作,經過一年時間完成咗基本架構之後,佢領導一個設計團隊參與其中。Swift經過大約4年嘅開發,卒之喺2014年6月發表。

蘋果宣稱Swift嘅特點係:快速、現代、安全,同埋互動。並且明顯好過Objective-C語言。

[編輯]

有本書叫做The Swift Programming Language,呢本書會由基本開始教讀者點樣用Swift來寫程式,兼格教埋讀者一啲實用嘅Swift技巧。

呢本書可以喺iBooks免費下載。[7]

參考[編輯]

  1. "Swift Has Reached 1.0". Apple. September 9, 2014. 原著喺2016-07-11歸檔. 喺March 8, 2015搵到.
  2. https://www.swift.org/blog/swift-5.10-released/; 出版日期: 2024年3月5號.
  3. "Swift, Objectively". 原著喺2022-01-08歸檔. 喺2022-04-09搵到. Swift is proprietary and closed: It is entirely controlled by Apple and there is no open source implementation.
  4. Lattner, Chris (June 11, 2014). "Re: [LLVMdev] [cfe-dev] [Advertisement] open positions in Apple's Swift compiler team". 原著喺2014年7月14號歸檔. 喺June 12, 2014搵到. You can imagine that many of us want it to be open source and part of LLVM, but the discussion hasn't happened yet, and won't for some time.
  5. Lattner, Chris (2014-06-03). "Chris Lattner's Homepage". Chris Lattner. 原著喺2015-12-22歸檔. 喺2014-06-03搵到. I started work on the Swift Programming Language in July of 2010. I implemented much of the basic language structure, with only a few people knowing of its existence. A few other (amazing) people started contributing in earnest late in 2011, and it became a major focus for the Apple Developer Tools group in July 2013 [...] drawing ideas from Objective-C, Rust, Haskell, Ruby, Python, C#, CLU, and far too many others to list.
  6. "Building assert() in Swift, Part 2: __FILE__ and __LINE__ - Swift B log -". Apple Developer. 原先內容歸檔喺2015-11-21. 喺2014-09-26搵到. Swift borrows a clever feature from the D language: these identifiers expand to the location of the caller when evaluated in a default argument list.
  7. The Swift Programming Language 書 互聯網檔案館歸檔,歸檔日期2014年6月3號,..

睇埋[編輯]

出面網頁[編輯]