Live data from Hacker News

Swift 5.3 Will Be Supported on Windows and Additional Linux Distributions

infoq.com

201–210 of 308 posts

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

#201
post #149

Earlier quoted context omitted.

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 c…

The lack of a stable ABI had nothing to do with preventing Apple from shipping apps written in it.

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

#202
post #176

But why? 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? You can't use it to build mac or iOS apps on Linux because the important libraries aren't there. There is no cross platform UI and Apple isn't likely to port and support theirs from macOS. If you are into servers then you have plenty of better languages options with establish…

Apple has to ensure that Swift is adopted as widely as possible to ensure that enough people in the world are theoretically able to submit apps to their store.

Nobody is submitting Windows apps written in Swift to the Mac App Store.

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

#203
post #97

Earlier quoted context omitted.

hard to open source it when its implementation is tied to the XNU kernel

XNU is one of the few parts of macOS that is actually open source. I’d be pretty surprised though if swiftUI were deeply dependent on the kernel itself, rather than on some graphics toolkit within macOS

It’s largely dependent (but not reliant) on the UI libraries.

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

#204

This is extremely exciting for me. I started writing a toy application for my iPhone using SwiftUI a few months ago and have been very impressed by Swift (coming from C#). So far, SwiftUI has felt exactly like what I wished XAML would become. The documentation and error messages are a complete disaster though ( https://nooverviewavailable.com/ )

Regarding error messages, which Xcode version are you on? They substantially improved after the Xcode update with an overhauled diagnostics engine. Documentation has been steadily improving, I’ve found that Apple does respond to Feedback Assistant reports about missing overviews and code listings, albeit way slower than I’d like.

I’m generally always on the latest released version. It _has) gotten better, but its still not good enough. For example, having two @Published variables in the same class with the same name causes a crash in the compiler with no pointers to the source.

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

#205

Earlier quoted context omitted.

Swift is also a much nicer language than C# in my opinion.

Could you argue why?

A lot more emphasis on functional programming & nicer syntax around it, preference of value types over reference types and immutability by default/opt in mutability, nicer parsing with Codable, nice pattern matching and destructuring syntax, native binaries by default, more flexible memory management.

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

#206
post #195

Earlier quoted context omitted.

Swift is also a much nicer language than C# in my opinion.

I'd argue the other way around. Not to mention that developing C# in Visual Studio or Rider feels years ahead of what's considered good enough IDE assistance in other languages. Comparable with Java even.

In some ways, Swift is a higher-level Rust. It places a lot more emphasis on functional programming, null safety, value types and immutability than C# does.

The more flexible memory management model added recently, native binaries, (as the default option) and even identifier: Type over type identifier is also a nice plus for me, I agree that the IDE situation is heavily in C#'s favor.

If C# is a nicer Java and Kotlin is a nicer C#, then Swift is a nicer Kotlin.

What would you argue C# has going for it over Swift?

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

#207
post #184

Earlier quoted context omitted.

Microsoft is working on cross platform GUI framework. I am not sure how i feel them choosing react native instead of something like Flutter. Maybe befause React native uses OS UI components while Flutter creates everything from scratch. https://microsoft.github.io/react-native-windows/

I think they are choosing react native because they genuinely like react. I don’t remember which video it was exactly, but one of the higher ups talked about future technologies within Microsoft and how they were doing more and more GUI-based thing with react. And if you look at it, they’ve done pretty amazing things within the JavaScript eco-system in general. Office 365 is amazing, Visual Studio Code is amazing and…

Yeah Flutter's main focus is mobile, they are working on Desktop Flutter, you can try it out on the master channel.

It looks like they are making progress, Chris Sells, a Flutter PM, tweeted

"While things have been delayed on the desktop side for Flutter due to the current crisis, the team has been working hard to bring both Windows and Linux support to alpha. I think you're going to be happy about what you see." https://twitter.com/csells/status/1261036199294062592

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

#209

Earlier quoted context omitted.

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…

Yeah, that could be an interesting use case.

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

#210

Earlier quoted context omitted.

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…

Doesn't seem like there would be much demand to run legacy Objective-C code on other platforms, as it would most likely be strongly tied into macOS or iOS APIs that would be availble anyway.

Indeed. Although, some of the things that Apple's ObjC Foundation provides that aren't in Swift's cross-platform Foundation are sorely missed — but I doubt there's much impetus to put them in Swift's cross-platform Foundation, either.
Post reply on HN