TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Swift 3.0 Released

210 点作者 olenhad超过 8 年前

21 条评论

tveita超过 8 年前
Does this release include a cross-platform Foundations library?<p><a href="https:&#x2F;&#x2F;github.com&#x2F;apple&#x2F;swift-corelibs-foundation&#x2F;blob&#x2F;master&#x2F;README.md" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;apple&#x2F;swift-corelibs-foundation&#x2F;blob&#x2F;mast...</a> says they intend it to be part of Swift 3.0, but <a href="https:&#x2F;&#x2F;github.com&#x2F;apple&#x2F;swift-corelibs-foundation&#x2F;blob&#x2F;master&#x2F;Docs&#x2F;Status.md" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;apple&#x2F;swift-corelibs-foundation&#x2F;blob&#x2F;mast...</a> still lists a lot of classes as &quot;Incomplete&quot; or &quot;Unimplemented&quot;
thomasahle超过 8 年前
Wow, they&#x27;ve basically renamed the entire Standard Library, see the changeset: <a href="https:&#x2F;&#x2F;github.com&#x2F;apple&#x2F;swift-evolution&#x2F;blob&#x2F;master&#x2F;proposals&#x2F;0006-apply-api-guidelines-to-the-standard-library.md" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;apple&#x2F;swift-evolution&#x2F;blob&#x2F;master&#x2F;proposa...</a><p>Not that I mind though. This kind of thing should be easy to auto refactor.
评论 #12496822 未加载
评论 #12496541 未加载
评论 #12496105 未加载
hellofunk超过 8 年前
One thing I never understood about Swift and that I don&#x27;t think is addressed in Swift 3 is the widespread inconsistency with simple &#x27;if&#x27; statements. There are at least three incompatible ways to think about &#x27;if&#x27; syntax in Swift:<p>if foo == 1 &amp;&amp; bar ==2 &#x2F;&#x2F;normal, from other languages<p>if let somevar = foo, let anothervar = bar &#x2F;&#x2F;note, must use a comma rather than &amp;&amp;<p>if case .someEnum = foobar &#x2F;&#x2F;cannot use == !<p>That latter would be much easier to think about like foobar == .someEnum but it gets mucked up.<p>I don&#x27;t understand why these can&#x27;t be streamlined into something like this:<p>if let a = b &amp;&amp; let d == f &amp;&amp; foobar == .someEnum &#x2F;&#x2F;you can&#x27;t do any of this<p>Instead, you have to use &quot;where&quot; and commas rather than &amp;&amp; in some places, the whole thing is a much greater cognitive overload than it should be for such a fundamental task in any language.
评论 #12498442 未加载
评论 #12497536 未加载
nicky0超过 8 年前
I look forward to using Swift in a couple of years when it is all stable. It looks great. Thanks to those of you using it now and contributing to its improvement.
评论 #12495765 未加载
WoodenChair超过 8 年前
What is the possibility of having Swift added upstream to Debian or Ubuntu so that I can just apt-get install it on those platforms?
mark_l_watson超过 8 年前
&quot;Official binaries for Ubuntu 14.04 and Ubuntu 15.10...&quot;<p>I am surprised they don&#x27;t support the latest Ubuntu with official binaries?
评论 #12497773 未加载
评论 #12550579 未加载
评论 #12550581 未加载
dep_b超过 8 年前
Swift 3.0 is really nice but I backtracked out of Xcode 8.0 for now. I am used to Xcode but this one still vomits Apple internal debug messages into the console, that&#x27;s really too rough for me. I&#x27;ll wait for the .01 or the .1 before upgrading all my projects.<p>Funny thing is I downloaded one of the first if not the first beta of Xcode 8 and it already migrated my projects flawlessly (where possible). It&#x27;s all the other stuff that&#x27;s broken.
评论 #12496919 未加载
评论 #12496853 未加载
justsaysmthng超过 8 年前
If you&#x27;re thinking of updating to Xcode 8, hoping that your project will &#x27;just build&#x27;, don&#x27;t get your hopes too high.<p>I&#x27;ve already spent all day fixing, updating, searching around for all kinds of errors that the build system throws at me. It also required me to update the project dependencies to their latest versions which support swift 3&#x2F;xcode 8. Some dependencies (like SwiftBond 5) have changed a lot and now my project has hundreds of syntax errors due to renamed methods, not that hard to fix, but not sure if they&#x27;ll still run the same...<p>So this is a major upgrade to your project - do it when you have spare time to waste.<p>In the meantime, I&#x27;m thinking of reverting to Xcode 7.3 and running the two versions side by side... Is that possible ?
评论 #12497016 未加载
valarauca1超过 8 年前
So is 3.0 when Swift is finally gonna settle into stability? Or are they gonna wait until 4.0 to stop breaking backwards compatibility?
评论 #12495352 未加载
评论 #12495683 未加载
sswezey超过 8 年前
I really wish Swift releases were not pinned to Apple releases. Swift 3 introduced several regressions and instead of prioritizing some serious regressions, they focused on swift evolution proposals. For example, one accepted proposal renamed the common array _flatten_ method to _joined_ because it aligned one use case. Granted this is low hanging fruit, but a whole bunch of low hanging fruit takes time away from serious bugs and enhancements.<p>If Swift really wants to become successful, they need to work on bigger picture things like fixing breaking regressions, planning full reflection, built-in async instead of bikeshedding about array methods. I understand they want a non-breaking API from 3.0, but everyone isn&#x27;t always going to be happy; and changing small functions for the vocal minority is not the correct path forward.<p>A list of 3.0 regressions: <a href="https:&#x2F;&#x2F;bugs.swift.org&#x2F;browse&#x2F;SR-2603?jql=labels%20%3D%203.0Regression" rel="nofollow">https:&#x2F;&#x2F;bugs.swift.org&#x2F;browse&#x2F;SR-2603?jql=labels%20%3D%203.0...</a> Flatten rename proposal: <a href="https:&#x2F;&#x2F;github.com&#x2F;apple&#x2F;swift-evolution&#x2F;blob&#x2F;master&#x2F;proposals&#x2F;0133-rename-flatten-to-joined.md" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;apple&#x2F;swift-evolution&#x2F;blob&#x2F;master&#x2F;proposa...</a>
评论 #12497538 未加载
评论 #12497258 未加载
insulanian超过 8 年前
&gt; It is not source-compatible with Swift 2.2 and 2.3.<p>This created havoc in Python. Hopefully it won&#x27;t happen here.
评论 #12495403 未加载
评论 #12494971 未加载
评论 #12494944 未加载
评论 #12495186 未加载
评论 #12495107 未加载
评论 #12495019 未加载
awzurn超过 8 年前
Can&#x27;t wait for the day when they&#x27;re done deciding to only make major releases every year, and actually settle on a common syntax and platform for the language, will be great not having to worry about my source code blowing up...<p>... then again, seeing some actual refactor support in Xcode would be pretty great too, but you can&#x27;t wish for too much at once.
评论 #12497784 未加载
评论 #12496995 未加载
评论 #12497123 未加载
leshow超过 8 年前
Every time I see swift, it&#x27;s crazy how much they&#x27;ve &#x27;borrowed&#x27; from rust. The language looks almost identical
评论 #12498384 未加载
评论 #12496942 未加载
overcast超过 8 年前
Sounds like an ideal time to dive into Swift, and start building something new.
prit91超过 8 年前
Most of the API&#x27;s are changed. Will need to migrate the code base from swift 2.3 to swift 3. Tedious work. But what I liked about the swift 3 API change was the swifitification of the GCD API. I liked it
skybrian超过 8 年前
Interesting that they dropped curried functions. Why do functional programmers seem to like it so much and mainstream programmers don&#x27;t care?
评论 #12498251 未加载
antiquark超过 8 年前
But how can anybody take a language seriously if it doesn&#x27;t have ++ and -- operators?
andrewvijay超过 8 年前
BREAKING again? Demotivating a lot.
评论 #12495533 未加载
评论 #12495651 未加载
评论 #12499324 未加载
评论 #12496360 未加载
unknowingone超过 8 年前
How can I get Swift 3.0 going on my Mac if I don&#x27;t want to upgrade from Mavericks?
评论 #12497061 未加载
jinmingjian超过 8 年前
congrats!
fit2rule超过 8 年前
Holding off on learning much more Swift for now, until things stabilize and stuff stops breaking. Its not much fun to go back to learn some Swift only to discover things have changed since last time ..
评论 #12496232 未加载