TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Swift 5 Exclusivity Enforcement

115 pointsby return_0eover 6 years ago

6 comments

kris-sover 6 years ago
I put Swift into the category of "almost memory managed" languages and it's never fully clicked in my brain. Thinking about strong/weak/unowned references is more difficult in my opinion than when to malloc/free something. Following the examples in the article just reinforced that maybe Swift's approach is a little too complex.
评论 #19090416 未加载
评论 #19090349 未加载
评论 #19090285 未加载
评论 #19093913 未加载
Teknoman117over 6 years ago
And here I thought this was going to be something about enforcing some exclusivity of swift to apple devices...
评论 #19091768 未加载
zaksoupover 6 years ago
I&#x27;m not totally versed in Swift. In the example provided is it ambiguous because the closure captures `count` and count itself is being modified by the method calling the block?<p>I don&#x27;t understand why this is an example of an unsafe operation. Wouldn&#x27;t clearly defined behavior of closures clarify the &quot;3 or 4&quot; question?
评论 #19090449 未加载
评论 #19090465 未加载
saagarjhaover 6 years ago
I&#x27;m assuming that -Ounchecked also removes the runtime diagnostic?
评论 #19091000 未加载
hnbrosephover 6 years ago
neat. maybe by swift 10 they will have windows builds and i can check it out.
Temasikover 6 years ago
How do you use swift on ubuntu
评论 #19091960 未加载