Live data from Hacker News

Swift 5.3 Will Be Supported on Windows and Additional Linux Distributions

infoq.com

31–40 of 308 posts

Re: Swift 5.3 Will Be Supported on Windows and Additional Linux Distributions

#32
post #28

Earlier quoted context omitted.

No OP, and I don't know much about game development, but "without any change at all" is too strong. SDL only does so much, and you still need platform-specific APIs for file access, networking (if applicable), threading, etc. So you'll still need platform-specific code until someone writes those abstractions in Swift.

not OP either. but i think the problem is simple. apple said no to opengl, which any other platform out there supports. btw, they are even deprecating opengl! i have no idea what that means for the tons of games written with an opengl backend. probably not an issue for the iOS ecosystem though. so that's what is going on...

OpenGL isn't relevant here, as SDL2 has a metal backend that's used by default on MacOS. See https://hg.libsdl.org/SDL/rev/1acae5590352

Re: Swift 5.3 Will Be Supported on Windows and Additional Linux Distributions

#33
This is good news to me! I'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't have a great support story. I know it has been able to run on some Linuxes for a while, but it just didn't appear to be a great ecosystem. Now, there's interesting stuff happening for both backend and fronted (https://twitter.com/lrz/status/1250644001604042752).

Re: Swift 5.3 Will Be Supported on Windows and Additional Linux Distributions

#34
post #25
post #16

Earlier quoted context omitted.

Ten years ago when I was offered a choice, I told the office manager I wanted a MacBook because of the trackpad. Apple’s trackpads are even better now. How has nobody figured out Apple’s 2010s trackpad technology?

How has nobody figured out Apple’s 2010s trackpad technology? I think because the focus is so much on the trackpad technology itself, which may be a misplaced focus. My fear is that the solution may involve rearchitecting the entire application-GUI stack to get it working on Linux. Why? Because Apple's trackpad is not a mouse emulator, it's a first class input device all the way up to the application. Trying to make…

Eh, I think you're overblowing it a bit. While Apple's trackpad does do some unique things (like Chinese character input[1]), most of the behavior that people are interested in emulating here can be reduced to the cursor position, click events, and (high-resolution) scroll events. The only part of this that isn't currently available on Linux, AFAIK, is the scrolling bits, and even that isn't critical.

[1]: https://support.apple.com/guide/chinese-input-method/use-tra...

Re: Swift 5.3 Will Be Supported on Windows and Additional Linux Distributions

#35

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

More likely Apple will just write server-side Swift code that we never see. I really hope they open some, the linux ecosystem for Swift is a little small

dunno about "never see." The last big server-side thing they made (to the best of my knowledge) is SwiftNIO, it's open source, and that was a huge deal for the Vapor project.

Re: Swift 5.3 Will Be Supported on Windows and Additional Linux Distributions

#36

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

Apple is strengthening their services revenue. They week profit from the extra reach. Also, people will continue to but their hardware because the alternatives aren’t that great Simple example.... the MacBook trackpad

I dunno IMO the macbook trackpad is not good,

RSI inducing tap to click barely works and you have to enable a horribly implemented accessibility options just to drag with a gesture to each their own though

the reflective screens they put on those things also cause eye damage

Re: Swift 5.3 Will Be Supported on Windows and Additional Linux Distributions

#37

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?

Paul Hudson's books and guides are very good. I churned through his "100 days of SwiftUI" a couple months ago, really liked it. https://www.hackingwithswift.com

Re: Swift 5.3 Will Be Supported on Windows and Additional Linux Distributions

#38
Whenever I'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's always felt to me like "cross-platform" for Swift means "the same syntax on a completely different platform." Has that changed, or will basic functionality on windows require a third completely different set of libraries?

Re: Swift 5.3 Will Be Supported on Windows and Additional Linux Distributions

#40
> It is not clear at the moment if Apple has any plans to port Swift UI to Windows and/or Linux

It seems pretty clear they have 0 plans on doing that. They could've open sourced it in the first place, along with Combine.

Not open sourcing Combine seems like a pretty short sighted decision to me.

Post reply on HN