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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Swift 5.3 Will Be Supported on Windows and Additional Linux Distributions

429 点作者 nan0大约 5 年前

30 条评论

judge2020大约 5 年前
&gt; . It is hard to think that any Windows programmer would prefer Swift as a language over .NET languages, as many commenters pointed out on Reddit, but a port of Swift UI on Windows could be a game changer.<p>Everybody would jump to Swift [for new projects] if it meant a cross-platform GUI framework.
评论 #23200264 未加载
评论 #23200555 未加载
评论 #23200790 未加载
评论 #23200438 未加载
评论 #23202003 未加载
评论 #23201104 未加载
评论 #23201265 未加载
评论 #23200481 未加载
评论 #23202365 未加载
评论 #23201263 未加载
评论 #23211165 未加载
评论 #23201404 未加载
评论 #23200897 未加载
richard_todd大约 5 年前
Whenever I&#x27;ve looked at examples on Swift on Linux in the past, the code always started with (hazy memory here) `use glibc` or similar, whereas the macOS version used a different library. So for example even just to produce a random number you had to use two completely different library functions imported with completely different names. All that to say: it&#x27;s always felt to me like &quot;cross-platform&quot; for Swift means &quot;the same syntax on a completely different platform.&quot; Has that changed, or will basic functionality on windows require a third completely different set of libraries?
评论 #23200743 未加载
评论 #23199883 未加载
评论 #23199870 未加载
_bxg1大约 5 年前
This is really exciting. Every time I see something about Swift my thought process is &quot;that looks like a lovely language but I don&#x27;t build iOS&#x2F;macOS apps, oh well&quot;. Maybe now I&#x27;ll give it a real go.<p>Fun fact: Graydon Hoare, the original inventor of Rust, now works at Apple on Swift.
评论 #23199340 未加载
评论 #23199270 未加载
sime2009大约 5 年前
But why?<p>Sure, there are people who want to tinker with it for fun, but outside of that what is the point in having Swift on Linux and Windows?<p>You can&#x27;t use it to build mac or iOS apps on Linux because the important libraries aren&#x27;t there. There is no cross platform UI and Apple isn&#x27;t likely to port and support theirs from macOS. If you are into servers then you have plenty of better languages options with established ecosystems. Maybe there are some command line apps on macOS which can now be ported to Linux&#x2F;Window, but beyond that, what is the point? Where is Apple trying to go with this?
评论 #23201472 未加载
评论 #23201343 未加载
评论 #23203298 未加载
评论 #23202335 未加载
评论 #23207714 未加载
评论 #23201474 未加载
评论 #23202136 未加载
myko大约 5 年前
&gt; It is not clear at the moment if Apple has any plans to port Swift UI to Windows and&#x2F;or Linux<p>It seems pretty clear they have 0 plans on doing that. They could&#x27;ve open sourced it in the first place, along with Combine.<p>Not open sourcing Combine seems like a pretty short sighted decision to me.
评论 #23199887 未加载
评论 #23203820 未加载
评论 #23199888 未加载
评论 #23200632 未加载
sakras大约 5 年前
Also worth noting that Saleem has also been working on a wrapper of Windows GDI for Swift. While it&#x27;s not a port of SwiftUI, it looks pretty similar.<p><a href="https:&#x2F;&#x2F;github.com&#x2F;compnerd&#x2F;swift-win32" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;compnerd&#x2F;swift-win32</a>
评论 #23201320 未加载
评论 #23202124 未加载
评论 #23199499 未加载
memco大约 5 年前
This is good news to me! I&#x27;ve been very interested in Swift for a long time, but mostly work doing web dev so it would only be useful to me if I could run it on Linux and it initially didn&#x27;t have a great support story. I know it has been able to run on some Linuxes for a while, but it just didn&#x27;t appear to be a great ecosystem. Now, there&#x27;s interesting stuff happening for both backend and fronted (<a href="https:&#x2F;&#x2F;twitter.com&#x2F;lrz&#x2F;status&#x2F;1250644001604042752" rel="nofollow">https:&#x2F;&#x2F;twitter.com&#x2F;lrz&#x2F;status&#x2F;1250644001604042752</a>).
评论 #23201184 未加载
xscott大约 5 年前
&gt; It is hard to think that any Windows programmer would prefer Swift as a language over .NET languages,<p>It&#x27;s not hard for me to think that. I&#x27;ve never been interested in .Net languages, and I write stuff for both Linux and Windows. If it was just Swift the language and compiler, and I had to wrap Win32 API calls by hand, I&#x27;d happily use it.
brigandish大约 5 年前
XCode (and hence most of the useful parts of using the Apple development ecosystem) as of v11.4 won&#x27;t install on Macs running Mojave it&#x27;s actually better, in my view, to use Mono&#x2F;C# and things like Xamarin than start off with Swift and think you can port the other way and not be forced into upgrading your laptop for the <i>privilege</i> of writing apps for Apple systems.
评论 #23200857 未加载
评论 #23200373 未加载
评论 #23200260 未加载
评论 #23202264 未加载
melling大约 5 年前
I have a Swift Cookbook that I maintain on Github:<p><a href="https:&#x2F;&#x2F;github.com&#x2F;melling&#x2F;SwiftCookBook" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;melling&#x2F;SwiftCookBook</a>
no_wizard大约 5 年前
Wonder if some macOS only software will get ported to Windows once this happens. That if course is assuming there’s good support for the Windows APIs for building apps
评论 #23199411 未加载
评论 #23199376 未加载
评论 #23199258 未加载
评论 #23200089 未加载
xvilka大约 5 年前
They need objc2swift, something like c2rust[1], to speed up the legacy code upgrade. Transpiler and code refactoring tool, all while preserving the ability to run tests. Or, on the other side, c2rust should get an Objective C support as an input.<p>[1] <a href="https:&#x2F;&#x2F;github.com&#x2F;immunant&#x2F;c2rust" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;immunant&#x2F;c2rust</a>
评论 #23201463 未加载
pier25大约 5 年前
I imagine the idea is basically writing Swift servers and sharing code between platforms.<p>I could be wrong but I <i>seriously</i> doubt we will cross platform SwiftUI, UIKit, etc.
badprose大约 5 年前
This is extremely exciting for me. I started writing a toy application for my iPhone using SwiftUI a few months ago and have been <i>very</i> impressed by Swift (coming from C#). So far, SwiftUI has felt exactly like what I wished XAML would become.<p>The documentation and error messages are a complete disaster though (<a href="https:&#x2F;&#x2F;nooverviewavailable.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;nooverviewavailable.com&#x2F;</a>)
评论 #23200436 未加载
iamcreasy大约 5 年前
Quick question: Does it mean now we can write games on Windows using SDL + Swift, and it will run on MacOS without any change at all?
评论 #23200633 未加载
评论 #23199583 未加载
tempodox大约 5 年前
Good news. I&#x27;m feeling a strong reluctance against languages that only work on one platform.
VexorLoophole将近 5 年前
Sounds like great news! Am excited to see, where Swift will end. I am no developer but I like to code things and script tasks (at work that&#x27;s even my job). Already tried many different languages. In the end I always used Python, because i feared that nobody can rewrite my code, if I write it in something more exotic.<p>Out of interest I spend some evenings in swift (server-side) and it felt some kind of fresh air. Python feels so &#x27;slugish&#x27; all the time. But I am worried, if swift will ever be &#x27;useful&#x27; server-side.
filleokus大约 5 年前
I don&#x27;t think this is evidence for a move to cross plattform UI apps, but I hope it&#x27;s a move to make Swift more useful on the server side.<p>As I&#x27;ve understood it, Foundation support is pretty good these days? But it would be cool if Apple ported even more frameworks that could be useful for server side applications. Recently I would have loved to have had AVFoundation available when doing some HLS parsing server side, for example.
sandGorgon大约 5 年前
Very interesting - so basically it will be versus React Native on Windows &amp; Mac (using Typescript) <a href="https:&#x2F;&#x2F;microsoft.github.io&#x2F;react-native-windows&#x2F;" rel="nofollow">https:&#x2F;&#x2F;microsoft.github.io&#x2F;react-native-windows&#x2F;</a><p>Arguably people are already used to creating desktop apps using JS&#x2F;Typescript using the Electron framework. React Native builds upon that.<p>2021 is going to be interesting
atarian大约 5 年前
I hope they also add better builtins for HTTP. Last time I worked with Swift it was difficult to get a simple server up and running without a framework.
评论 #23200873 未加载
andrewrothman大约 5 年前
Off-topic, but I read the title as &quot;Supported on Linux distributions including but not limited to Windows&quot;. Microsoft, you know what we want.
评论 #23200222 未加载
brendenw大约 5 年前
Surprised OP have overlooked the importance of adding Amazon Linux 2.<p>That opens the door to seamless and full supported AWS Lambda functions in Swift.
forrestthewoods大约 5 年前
What’s the best resource to learn Swift? Should I grab a Bluetooth keyboard and go through Swift Playgrounds on iPad? Or is that more for children brand new to programming?
评论 #23199752 未加载
评论 #23199802 未加载
评论 #23199809 未加载
mosselman大约 5 年前
This looks good. I started learning Swift a few days ago because I want to play around with iOS and macos apps, so good to see I could use it on other platforms too.
cutler大约 5 年前
... but not on OS X Mojave. What a joke.
awinter-py大约 5 年前
linux builds of ios apps would lead to general improvement in the state of build tooling for mobile (IMO)<p>I take it this isn&#x27;t that?
评论 #23202024 未加载
评论 #23200306 未加载
ww520大约 5 年前
This is excellent news.
nloladze大约 5 年前
Huh, might finally get around to Apple garbage. Closing your users to one internal system with internal hardware works for speed and maintenance issues([with users] look at early Windows with it&#x27;s struggles and blue screens despite it&#x27;s prevalent use across various hardware systems. But it doesn&#x27;t work with devs. Dude if I can&#x27;t code your stuff or for your platform on my shitty little linux, I have zero interest in working on your platform or utilizing your tech stack.
mister_hn大约 5 年前
I will find swift interesting only once you can build apps without having a Mac
eggsnbacon1大约 5 年前
So many comments suggesting different UI frameworks with varying levels of cross-platform support.<p>Guys, I hate to say this, just use Java. Its fully cross-platform with a complete UI toolkit that looks native and isn&#x27;t slow. You&#x27;re not going to find anything else thats as complete or performant. Java has been focused on this niche forever.<p>I bet you use Java GUI&#x27;s all the time without even knowing it. Most of you every day. Tons of IDE&#x27;s, database visualizers, and other dev tools are made with Java GUI&#x27;s.<p>Every Jetbrains tool, DBeaver, DB Visualizer, MySQL Workbench, other stuff I&#x27;m too lazy to look up. If you have a tool thats not web with a big UI, its Electron or Java 90% of the time.
评论 #23202072 未加载