swift 3.0 版本即將於年底上市...大家挫咧等??

swift 3.0 版本即將於年底上市...大家挫咧等??

ilyi1116 2016-05-25 14:31

The design of commonly-used libraries has a large impact on the overall feel of a programming language. Great libraries feel like an extension of the language itself, and consistency across libraries elevates the overall development experience. To aid in the construction of great Swift libraries, one of the major goals for Swift 3 is to define a set of API design guidelines and to apply those design guidelines consistently.

The effort to define the Swift API Design Guidelines involves several major pieces that, together, are intended to provide a more cohesive feel to Swift development. Those major pieces are:

  • Swift API Design Guidelines: The actual API design guidelines are under active development. The latest draft of Swift API Design Guidelines is available.

  • Swift Standard Library: The entire Swift standard library is being reviewed and updated to follow the Swift API design guidelines. The actual work is being performed on the swift-3-api-guidelines branch of the Swift repository.

  • Imported Objective-C APIs: The translation of Objective-C APIs into Swift is being updated to make Objective-C APIs better match the Swift API design guidelines, using a variety of heuristics. The Better Translation of Objective-C APIs into Swift proposal describes how this transformation is done. Because this approach naturally involves a number of heuristics, we track its effects on the Cocoa and Cocoa Touch frameworks, as well as Swift code using those frameworks. The Swift 3 API Design Guidelines Review repository provides a way to see how this automatic translation affects Swift code that uses Cocoa and Cocoa Touch. Specific Objective-C APIs that translate poorly into Swift will then be annotated (for example, with NS_SWIFT_NAME) to improve the resulting Swift code. While this change primarily impacts Apple platforms (where Swift uses the Objective-C runtime), it also has a direct impact on the cross-platform Swift core libraries that provide the same APIs as Objective-C frameworks.

  • Swift Guideline Checking: Existing Swift code has been written to follow a variety of different coding styles, including the Objective-C Coding Guidelines for Cocoa. By leveraging the heuristics used to import Objective-C APIs, the Swift compiler can (optionally!) check for common API design patterns that don’t meet the Swift API Design Guidelines and suggest improvements.

  • Swift 2 to Swift 3 Migrator: The updates to the Swift standard library and the imported Objective-C APIs are source-breaking changes. This effort will involve the creation of a migrator to update Swift 2 code to use the Swift 3 APIs.

All of these major pieces are under active development. If you’re interested in following along, check out the Swift API design guidelines, the Swift standard library changes, the Objective-C API importer changes proposal and correspondingreview repository, then join the discussion on the swift-evolution mailing list.

熱門文章
米酵菌酸「洗滌、烹飪」都沒用!2狀況迅速繁殖 短時間奪命
米酵菌酸「洗滌、烹飪」都沒用!2狀況迅速繁殖 短時間奪命

TVBS新聞網

再撐一天就放假!711限時招待「美式買一送一」 周五咖啡優惠一次看
再撐一天就放假!711限時招待「美式買一送一」 周五咖啡優惠一次看

中天新聞

寶林茶室「清庫存」害死人?台南女苦主曝巧合:遷店前剩4道菜可點
寶林茶室「清庫存」害死人?台南女苦主曝巧合:遷店前剩4道菜可點

中天新聞

寶林死者家屬喊告醫院! 醫師嘆兩敗俱傷:我們只是要背人命的社畜
寶林死者家屬喊告醫院! 醫師嘆兩敗俱傷:我們只是要背人命的社畜

中天新聞

寶林2死!台大醫喊避免「這種飯、麵」重複加熱 米酵菌酸更猛爆
寶林2死!台大醫喊避免「這種飯、麵」重複加熱 米酵菌酸更猛爆

TVBS新聞網

跟團旅遊比自由行棒!妹子試過一次就愛上:理智線不會斷裂
跟團旅遊比自由行棒!妹子試過一次就愛上:理智線不會斷裂

TVBS新聞網

北台灣變天!「雷雨胞將襲」影響程度曝 下周暖熱如夏
北台灣變天!「雷雨胞將襲」影響程度曝 下周暖熱如夏

中天新聞

寶林茶室食物中毒案重大發現!死者解剖確認驗出「米酵菌酸」!
寶林茶室食物中毒案重大發現!死者解剖確認驗出「米酵菌酸」!

食力foodNEXT

台南角頭公司又被開槍!槍手原欲掃射50槍卻糗「卡彈」 警急逮4嫌
台南角頭公司又被開槍!槍手原欲掃射50槍卻糗「卡彈」 警急逮4嫌

記者爆料網

寶林茶室中毒案致命真相曝光!死者驗出「米酵菌酸」 台大教授:全身細胞迅速失能
寶林茶室中毒案致命真相曝光!死者驗出「米酵菌酸」 台大教授:全身細胞迅速失能

中天新聞

興櫃首例!康霈生技股票面額變更為5元 新股今起交易
興櫃首例!康霈生技股票面額變更為5元 新股今起交易

品觀點傳媒

不是廟口夜市!基隆「最強景點」吸272萬人 遊客讚:乾淨好玩
不是廟口夜市!基隆「最強景點」吸272萬人 遊客讚:乾淨好玩

TVBS新聞網

買命錢也坑2/薰衣草保單綁架保戶 壽險史首例漲價停售遭重罰是這家
買命錢也坑2/薰衣草保單綁架保戶 壽險史首例漲價停售遭重罰是這家

CTWANT

汪小菲求婚Mandy成功!曬鑽戒表示「愛台灣」
汪小菲求婚Mandy成功!曬鑽戒表示「愛台灣」

記者爆料網

寶林茶室案死者遺體驚現「米酵菌酸」 營養師一圖解析預防懶人包
寶林茶室案死者遺體驚現「米酵菌酸」 營養師一圖解析預防懶人包

記者爆料網

鴻海、廣達...黃仁勳欽點「8家將」護體輝達:AI是新的工業革命「台灣處於最中心位置」
鴻海、廣達...黃仁勳欽點「8家將」護體輝達:AI是新的工業革命「台灣處於最中心位置」

今周刊

寶林疑吃粿條致死掀恐慌!醫揭「2食物製品」更要怕 易生長米酵菌酸
寶林疑吃粿條致死掀恐慌!醫揭「2食物製品」更要怕 易生長米酵菌酸

TVBS新聞網

獨家/汪小菲求婚成功!示愛新歡Mandy:我的老婆來自台北
獨家/汪小菲求婚成功!示愛新歡Mandy:我的老婆來自台北

CTWANT

快訊/寶林茶室案重大發現!台灣首度驗出 首例死亡個案解剖發現「米酵菌酸」
快訊/寶林茶室案重大發現!台灣首度驗出 首例死亡個案解剖發現「米酵菌酸」

記者爆料網

全台變天!大雷雨「南往北狂炸」連下5天 午後1地雨勢最猛
全台變天!大雷雨「南往北狂炸」連下5天 午後1地雨勢最猛

TVBS新聞網

90
0
分享