{"id":27115,"date":"2022-11-22T13:13:53","date_gmt":"2022-11-22T05:13:53","guid":{"rendered":"http:\/\/lrxjmw.cn\/?p=27115"},"modified":"2022-11-22T13:14:28","modified_gmt":"2022-11-22T05:14:28","slug":"recalling-swift","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/recalling-swift.html","title":{"rendered":"\u56de\u987eSwift 3\uff0c\u5c55\u671bSwift 4"},"content":{"rendered":"\n\n\n
\u5bfc\u8bfb<\/td>\n\u5728Swift 3 late 2016\u7248\u672c\u4e34\u8fd1\u53d1\u5e03\u4e4b\u9645\uff0c\u82f9\u679c\u516c\u53f8\u5f00\u53d1\u8005\u5de5\u5177\u90e8\u95e8\u9ad8\u7ea7\u603b\u76d1Chris Lattner\u53d1\u7ed9\u201cSwift-evolution\u201d\u90ae\u4ef6\u5217\u8868\u4e00\u7bc7\u957f\u6587\u3002\u6587\u4e2d\u5bf9Swift 3\u7684\u5f00\u53d1\u8fc7\u7a0b\u8fdb\u884c\u4e86\u56de\u987e\uff0c\u5e76\u7ed9\u51fa\u4e86\u5bf9Swift 4\u7684\u671f\u671b\u3002<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n

\"swift-trimming-shears-square-250x250\"<\/p>\n

\u5728\u5bf9Swift 3\u7684\u56de\u987e\u4e2d\uff0cLattner\u4e3b\u8981\u4fa7\u91cd\u4e8e\u8bf4\u660e\u5f00\u6e90\u8f6f\u4ef6\u5f00\u53d1\u7684\u6210\u6548\u53ca\u6240\u5b58\u5728\u7684\u7f3a\u70b9\u3002\u4ed6\u7279\u522b\u6307\u51fa\uff0c\u76f8\u5bf9\u4e8e\u201c\u5c01\u95ed\u5f0f\u8bbe\u8ba1\u201d\u800c\u8a00\uff0c\u201c\u5f00\u653e\u5f0f\u8bbe\u8ba1\u201d\u901f\u5ea6\u6162\u4e14\u66f4\u96be\u9884\u6d4b\uff0c\u4f46\u662f\u6700\u7ec8\u7ed3\u679c\u5374\u662f\u201c\u663e\u8457\u5730\u6539\u5584\u201d\u4e86\u3002\u5bf9\u4e8e\u5f00\u53d1\u800c\u8a00\uff0c\u4f7f\u5f00\u53d1\u793e\u533a\u4e13\u6ce8\u4e8e\u6709\u9650\u6570\u91cf\u7684\u4e3b\u9898\u4e0a\uff0c\u4ee5\u53ca\u4f7f\u6838\u5fc3\u56e2\u961f\u53c2\u4e0e\u5230\u6700\u524d\u7ebf\u7684\u5173\u7cfb\u8ba8\u8bba\u4e2d\uff0c\u8fd9\u4e24\u8005\u662f\u81f3\u5173\u91cd\u8981\u7684\u3002\u6b64\u5916\uff0cLattner\u8fd8\u6307\u51fa\uff0c\u5728\u5f00\u53d1\u4e2d\u5177\u5907\u660e\u786e\u7684\u76ee\u6807\u5c06\u6709\u52a9\u4e8e\u5de5\u4f5c\u91cd\u70b9\u7684\u786e\u5b9a\uff0c\u5e76\u53ef\u907f\u514d\u51fa\u73b0\u5728\u8bbe\u8ba1\u8303\u56f4\u4e4b\u5916\u5b8c\u6210\u7684\u5b50\u9879\u76ee\u3002<\/p>\n

\u57fa\u4e8e\u4e0a\u8ff0\u89c2\u70b9\uff0cLattner\u9610\u660e\u4e86Swift 4\u6240\u5c06\u5177\u6709\u7684\u4e24\u4e2a\u9996\u8981\u8bbe\u8ba1\u76ee\u6807\uff0c\u5373\u201c\u81ea3.0\u7248\u672c\u8d77\uff0c\u4ea4\u4ed8\u5177\u6709\u6e90\u7801\u7a33\u5b9a\u6027\u627f\u8bfa\u7684\u7248\u672c\uff0c\u4ee5\u53ca\u4e3a\u6807\u51c6\u5e93\u63d0\u4f9bABI\u7a33\u5b9a\u6027\u201d\u3002\u9274\u4e8e\u6b64\uff0c\u53ef\u9884\u89c1\u6838\u5fc3\u56e2\u961f\u76f4\u52302017\u5e74\u6625\u90fd\u5c06\u5fd9\u788c\u4e8e\u7b2c\u4e00\u9636\u6bb5\u3002\u8be5\u9636\u6bb5\u7684\u5de5\u4f5c\u4e3b\u8981\u662f\u9488\u5bf9\u5f71\u54cd\u73b0\u6709ABI\u6216\u8005\u662f\u5bfc\u81f4\u73b0\u6709\u6807\u51c6\u5e93\u7279\u6027\u53d1\u751f\u91cd\u8981\u6539\u53d8\u7684\u7279\u6027\u3002\u4e0b\u9762\u5217\u51fa\u4e86\u6838\u5fc3\u56e2\u961f\u5728\u7b2c\u4e00\u9636\u6bb5\u4e2d\u5c06\u4f18\u5148\u5b9e\u73b0\u7684\u4e00\u4e9b\u7279\u6027\uff1a<\/p>\n

    \n
  1. \u6e90\u7801\u7a33\u5b9a\u6027\uff0c\u4f8b\u5982\u7f16\u8bd1\u5668\u9009\u9879-std=swift3\uff0c\u4f7f\u7528\u8be5\u9009\u9879\u53ef\u6709\u6761\u4ef6\u5730\u542f\u7528\u66f4\u591a\u7684\u76ee\u524d\u6b63\u5728\u5f00\u53d1\u4f46\u5c1a\u4e0d\u7a33\u5b9a\u7684\u529f\u80fd\uff1b<\/li>\n
  2. \u9002\u5e94\u6027\uff0c\u63d0\u4f9b\u5728\u4e0d\u5f71\u54cdABI\u7a33\u5b9a\u6027\u7684\u524d\u63d0\u4e0b\u4f7f\u516c\u7528API\u6301\u7eed\u6f14\u8fdb\u7684\u65b9\u6cd5\uff1b<\/li>\n
  3. \u6807\u51c6\u5e93\u6240\u9700\u7684\u901a\u7528\u6539\u8fdb\uff0c\u4f8b\u5982\uff1a\u6761\u4ef6\u6027\u7b26\u5408\uff08conditional conformances\uff09\u3001\u9012\u5f52\u534f\u8bae\u7ea6\u675f\uff08recursive protocol requirements\uff09\uff0c\u4ee5\u53ca\u5176\u5b83\u7684\u4e00\u4e9b\u6539\u8fdb\uff1b<\/li>\n
  4. \u5bf9\u5b57\u7b26\u4e32\u7684\u91cd\u8bc4\u4f30\uff0c\u76ee\u7684\u5728\u4e8e\u6539\u8fdbSwift\u7684\u5b57\u7b26\u4e32\u7f16\u7a0b\u6a21\u578b\uff0c\u4f7f\u5f97\u8be5\u6a21\u578b\u505a\u5230\u4e0ePerl\u5b57\u7b26\u4e32\u5904\u7406\u4e00\u6837\u7684\u597d\u3002<\/li>\n
  5. \u5185\u5b58\u6240\u6709\u6743\u6a21\u578b\uff08\u53ef\u9009\u9879\uff09\u3002\u8be5\u6a21\u578b\u53d7Cyclone\u6216Rust\u7684\u5185\u5b58\u6240\u6709\u6743\u6a21\u578b\u542f\u53d1\uff0c\u76ee\u7684\u5728\u4e8e\u5b9e\u73b0\u6027\u80fd\u7684\u53ef\u9884\u6d4b\u6027\u548c\u786e\u5b9a\u6027\u3002\u66f4\u591a\u7ec6\u8282\u53ef\u53c2\u8003\u8fd9\u91cc\u3002<\/li>\n<\/ol>\n

    \u4e00\u65e6\u7b2c\u4e00\u9636\u6bb5\u7684\u8fdb\u5c55\u8fbe\u5230\u9876\u5cf0\uff0c\u7b2c\u4e8c\u9636\u6bb5\u5c06\u6839\u636e\u6240\u5269\u4f59\u7684\u65f6\u95f4\u5bf9\u65b0\u7279\u6027\u8fdb\u884c\u754c\u5b9a\u548c\u89c4\u5212\u3002\u5728\u7b2c\u4e8c\u9636\u6bb5\u4e2d\u4f1a\u8003\u8651\u4ee5\u4e0b\u7279\u6027\uff1a<\/p>\n

      \n
    1. \u53cd\u5c04\uff0c\u5305\u62ec\u4e00\u4e2a\u9762\u5411\u7528\u6237\u7684\u3001\u7528\u4e8e\u6570\u636e\u548c\u65b9\u6cd5\u53cd\u5c04\u7684API\uff1b<\/li>\n
    2. \u4e00\u6d41\u7684\u5e76\u53d1\uff0c\u5305\u62ec\uff1aactor\u3001\u540c\u6b65\/\u7b49\u5f85\u3001\u539f\u5b50\u6027\u3001\u5185\u5b58\u6a21\u578b\u53ca\u5176\u5b83\u4e00\u4e9b\u76f8\u5173\u4e3b\u9898\u3002\u4e0d\u5e78\u7684\u662f\uff0c\u636e\u62c9\u7279\u7eb3\u6240\u8bf4\uff0c\u5728Swift 4\u7248\u672c\u4e2d\u5c06\u65e0\u6cd5\u6309\u65f6\u5b9e\u73b0\u8fd9\u4e2a\u65b0\u7684\u5e76\u53d1\u6a21\u578b\uff1b<\/li>\n
    3. \u66f4\u591a\u7684\u901a\u7528\u6539\u8fdb\u3002\u4f46\u6b63\u5982\u6cdb\u578b\u58f0\u660e\u4e2d\u6240\u8ff0\uff0c\u8fd9\u4e9b\u6539\u8fdb\u5e76\u975e\u662fABI\u7a33\u5b9a\u6027\u6240\u7279\u9700\u7684\uff1b<\/li>\n
    4. .swiftmodule\u7a33\u5b9a\u6027\uff0c\u4ee5\u4fbf\u4e8e\u88ab\u7b2c\u4e09\u65b9\u7684\u4e8c\u8fdb\u5236\u6846\u67b6\u6240\u4f7f\u7528\uff1b<\/li>\n
    5. \u65b0\u7684\u811a\u672c\u8bed\u8a00\u7279\u6027\uff0c\u4f8b\u5982\uff1a\u6b63\u5219\u8868\u8fbe\u5f0f\u3001\u591a\u884c\u6587\u5b57\u7684\u5b57\u7b26\u4e32\u7b49\uff1b<\/li>\n
    6. \u5c5e\u6027\u884c\u4e3a\uff0c\u76ee\u7684\u662f\u5728\u8bed\u8a00\u5185\u6838\u4e4b\u5916\uff0c\u63d0\u4f9b\u4e00\u79cd\u5b9a\u4e49lazy\u3001observers\u3001synchronization\u7b49\u5c5e\u6027\u884c\u4e3a\u7684\u7075\u6d3b\u6a21\u578b\u3002<\/li>\n<\/ol>\n

      Lattner\u6700\u540e\u6307\u51fa\uff0c\u8fd8\u6709\u8bb8\u591a\u5728\u7b2c\u4e8c\u9636\u6bb5\u4e2d\u9700\u8981\u8003\u8651\u7684\u7279\u6027\uff0c\u4f8b\u5982\uff1a\u5b50\u6a21\u5757\u3001\u6570\u503c\u7c7b\u578b\u95f4\u7684\u9690\u5f0f\u7c7b\u578b\u63d0\u5347\u3001C++ API\u7684\u5f15\u5165\u3001\u5065\u5eb7\u5b8f\u7cfb\u7edf\u3001\u5c3e\u90e8\u8c03\u7528\u7ea6\u5b9a\u3001\u652f\u6301\u679a\u4e3e\u7c7b\u578b\u3001\u201cthrows\u201d\u7c7b\u578b\u5316\u3001\u7528\u6237\u81ea\u5b9a\u4e49\u5c5e\u6027\u3001\u62bd\u8c61\u65b9\u6cd5\u6216\u7c7b\u3001\u66f4\u597d\u7684SIMD\u652f\u6301\u3001\u6570\u636e\u5e76\u884c\u652f\u6301\u3001\u9ad8\u7ea7\u7c7b\u7c7b\u578b\u7b49\u3002<\/p>\n

      \u6838\u5fc3\u56e2\u961f\u9884\u671f\u57282017\u5e74\u79cb\u5b63\u80fd\u53d1\u5e03Swift 4\u3002<\/p>\n

      \n

      \u539f\u6587\u6765\u81ea\uff1ahttp:\/\/www.linuxeden.com\/html\/news\/20160815\/167528.html<\/a><\/p>\n

      \u672c\u6587\u5730\u5740\uff1ahttp:\/\/lrxjmw.cn\/recalling-swift.html<\/a>\u7f16\u8f91\u5458\uff1a\u6768\u5e06\uff0c\u5ba1\u6838\u5458\uff1a\u51af\u742a<\/span><\/p>\n<\/blockquote>\n","protected":false},"excerpt":{"rendered":"

      \u5bfc\u8bfb \u5728Swift 3 late 2016\u7248\u672c\u4e34\u8fd1\u53d1\u5e03\u4e4b\u9645\uff0c\u82f9\u679c\u516c\u53f8\u5f00\u53d1\u8005\u5de5\u5177\u90e8\u95e8\u9ad8\u7ea7\u603b\u76d1Chris Latt […]<\/p>\n","protected":false},"author":63,"featured_media":27361,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[21],"tags":[],"class_list":["post-27115","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-news"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/27115","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/users\/63"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=27115"}],"version-history":[{"count":4,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/27115\/revisions"}],"predecessor-version":[{"id":257874,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/27115\/revisions\/257874"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/27361"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=27115"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=27115"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=27115"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}