Live data from Hacker News

Swift 5.3 Will Be Supported on Windows and Additional Linux Distributions

infoq.com

161–170 of 308 posts

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

#161
post #149

Earlier quoted context omitted.

I’ve spent the last week learning SwiftUI to see how hard it would be to reimplement Notion in a performant way. It seems really ... unfinished. Like, the default List view is really hard to style. I spent 4 hours yesterday trying to get an unstyled text Button to have a hit target bigger than the characters themselves. Adding a frame with a background worked, but if the frame had no background (or a transparent back…

That is the thing I dont like about the current Apple. They used to release things where you see they put a lot of thoughts into it. Now they are half baked. This isn't so much a problem on Apps ( The Product ) where it is constantly being updated and tweaked. But with code you have the hassle to try and keep up. And the pace of improvement is very very slow. To put things into perspective, Swift UI has been developm…

> Apple also isn't dogfooding much with Swift.

That's because it didn't have a stable ABI until Swift 5, released last year. Now that it does, a lot of their iOS/iPadOS apps have been rewritten, at least partially but sometimes fully, in Swift; this includes some of their Catalyst apps on Mojave and Catalina.

The only app I know for sure to be fully written in Swift, thus far, is the Apple Developer app (previously called WWDC), but I know there are others (they were mentioned in last year's WWDC sessions).

> Swift UI has been in development for 4 years

I must have missed this. Where did you hear this? I'd love to see more info about that.

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

#162

Earlier quoted context omitted.

I'd say swift is currently probably the best languages out there. Language features, standard library, performance, memory management.

Just checking my notes...and the answer is no.

Dismissive responses like this are frowned upon by the HN community guidelines. Give your reasonings, not a snide remark.

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

#163
post #69

Earlier quoted context omitted.

You can still get around this because it's still possible to run Hackintosh in a VM.

Okay, but surely that's a workaround for devs who are primarily on non-Mac systems who want to use native features for Mac. What's the win with Swift if I'm developing on Windows over using, say, C# and benefitting from all the support for my primary base and then using something like Xamarin. I'm on a Mac already (Macbook with 10.14) - am I really going to have to run a VM because of a point release ? (That goes for…

> because of a point release

The second set of digits represents major releases. The third set represents point releases.

macOS has been out, using this versioning scheme for a little over 20 years. Don't belittle the work between major releases just because the first set of digits hasn't changed.

Windows Vista through Windows 8.1 are all 6.x, but nobody would claim that Vista and its service packs, 7 and its service pack, and the 8 family are minor upgrades — there were some colossal technical changes under the hood between each, especially regarding security and device drivers.

Same thing for major releases of macOS, even if the user-facing stuff doesn't appear to be all that different.

Also, if your machine supports 10.14, it supports 10.15. The last MacBook Pro that dropped support for anything more recent came out in 2011. Nobody's asking you to buy a new laptop.

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

#164
post #24

Earlier quoted context omitted.

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

i only know of a couple of server side swift software and one of them by IBM was discontinued.

IBM's Kitura was never as popular as Vapor or Perfect. Plus, once Apple released SwiftNIO, much of the things people did use Kitura for were made redundant.

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

#165

Earlier quoted context omitted.

Embarcadero was able to do it with Delphi. Android, iOS, macOS, Windows, and Linux. Single codebase single UI. It looks like the bear is in keeping up with all the platform updates all the time though.

Whether it is actually good is subjective though. There are tons of existing cross-platform UI frameworks (Qt, wx, libui, JavaFX, TornadoFX, ...). The comment above says "Everybody would jump to Swift [for new projects] if it meant a cross-platform GUI framework." And yet people are still wondering why Electron ends up being the technology of choice for so many desktop apps.

> Electron ends up being the technology of choice for so many desktop apps.

probably because of the large number of JS only developers.

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

#166

Earlier quoted context omitted.

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

> RSI inducing tap to click [...]

How does tap to click induce RSI? Surely it's easier on your wrist and hand than having to press a button with force.

> [...] tap to click barely works

That experience doesn't seem to square with most peoples' experience.

> [...] and you have to enable a horribly implemented accessibility options just to drag with a gesture

I'm guessing you mean that it's annoying that dragging with three fingers is hidden inside the Accessibility preference pane rather than more sensibly placed in Trackpad preferences.

It's true, that's a dumb place to put it — but that doesn't impact whether or not the MacBook trackpad itself is good, which is what you were asserting.

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

Okay, now you're just ranting.

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

#167

> . 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. Everybody would jump to Swift [for new projects] if it meant a cross-platform GUI framework.

>Everybody would jump to Swift [for new projects] if it meant a cross-platform GUI framework.

Not really. I'm sure there are plenty who will just stick with Qt based options or even Electron.

I've seen a lot of stuff built in PyQt by people who aren't strictly developers and who learned Python only because it fits with some other aspect of their job. There isn't a lot to incentivise them in learning a new language.

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

#168
post #15

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. [1] https://github.com/immunant/c2rust

In my opinion, the integration between Objective-C and Swift is so incredibly seamless, that there's no need to translate existing Objective-C code. When I started working at my current client, there was a huge existing Objective-C code base to talk to an internal HTTP API. I just started coding. When I needed to add functions, I subclassed Objective-C classes in Swift.

There is need to translate existing Objective-C code: on platforms where the Objective-C bridge is unavailable (Linux and Windows), Swift code can not call Objective-C code, nor toll-free bridge with Objective-C types, and therefore Objective-C types cannot be subclassed.

For non-Apple platforms, you have to use a different implementation of Foundation — which has pretty good but not identical coverage to Apple's one.

As a side note, it's always seemed clear to me that when Apple provides a new technology, they provide a stop-gap solution, like Carbon, for developers who, for a variety of possible reasons, may not be able or willing to use the new tech, like Cocoa.

The bridge between Objective-C and Swift has always seemed like Carbon to me.

Fortunately, unlike when Carbon was canned and rewriting for Cocoa seemed like a real chore, I don't think Apple will can the Objective-C bridge any time soon — but for Swift code now targeting or intending to target non-Apple platforms, it may be best to start thinking about migrating away from relying on the bridge now — decarbonify your Swift code.

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

#169
post #28

Earlier quoted context omitted.

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...

Why would you want an old API like OpenGL when you can use Vulkan and Metal

And in case anybody comes in raving about how Vulkan isn't supported on macOS, that's fine, Vulkan-to-Metal compatibility layer libraries are available.

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

#170

linux builds of ios apps would lead to general improvement in the state of build tooling for mobile (IMO) I take it this isn't that?

Indeed it isn't. That would require Apple's proprietary frameworks and macOS-specific utilities that support their Apple-only toolchains.
Post reply on HN