Live data from Hacker News

Swift 5.3 Will Be Supported on Windows and Additional Linux Distributions

infoq.com

241–250 of 308 posts

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

#241
post #214
post #192

Earlier quoted context omitted.

I'd love to have a modern statically typed language with type inferencing etc. that can be used for scripting, working in a REPL, as well as compiling to native code. I've never tried Swift, but it seems it could have all the required features. I guess it's just lacking a lot of libraries that work on Linux.

OCaml fits the bill.

OCaml definitely has some weirdness that come from its age though (char==byte thing for example.)

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

#242

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

Creating a good cross-platform GUI framework is probably harder than creating a good cross-platform language.

Lazarus would like to have a word with you.

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

#243
post #186

Earlier quoted context omitted.

Creating a good cross-platform GUI framework is probably harder than creating a good cross-platform language. Way way way way way harder, I'd think. It's basically never been done in the modern era. All the successful ones from the past look (and work) like garbage on a modern desktop computer (I use gnucash for my dad's business, ha ha). SwiftUI is an interesting re-think, though, and as a Windows 10 user, I can tel…

I think the opportunity is particularly on how SwiftUI has been implemented in iOS, iPadOS and macOS, by relying on the native UI of each platform and providing a common abstraction for developers. Instead of providing the same UI that works badly on every device, SwiftUI interprets each concept differently according to the platform. For example, a Toggle in an iOS and iPadOS app looks like a on/off switch, while on…

I can’t comment on SwiftUI in particular, but I’ve found that a lot of things like this tend to break down in most other cross platform GUI frameworks, falling into a kind of uncanny valley, where the experience ends up being either:

1. Native feeling, but sufficiently inflexible that only very simple, common UI patterns can be implemented

2. An “uncanny valley” native ui, where things are almost native but often feel wrong in subtle ways

I think that’s why Electron has succeeded where so many cross platform UI frameworks failed: it’s so obviously not native that it doesn’t fall into that “uncanny valley” anymore

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

#244
post #233

Earlier quoted context omitted.

OK then: - Slow compilation, I think even now immutably concatenating a handful of strings makes the compile time exponential. - Over reliance on keywords and special case syntax, magic doesn't compose. A bunch of it just supports Optional for example. - Xcode, nuff said. - Equatable and Hashable for tuples were implemented with invisible compiler magic, so they wouldn't work with generics. - Variance is hot garbage,…

Sounds like you describe the state of Swift at least three years ago. SourceKit just doesn't crash anymore on me anymore, ever. Compile times are quite good for me nowadays, still not as fast as Objective-C but then again you don't get compile time guarantees for free.

The exponential issue was still there in version 4 and I think 5 as well. Didn't say SourceKit crashed, but it was virtually useless because it functioned like a crap version of the language parser.

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

#245
post #47

Earlier quoted context omitted.

Swift wasn't originally open-source, either.

Not only did they announce that it would be open source immediately, unlike the source code dump they did with WebKit, Apple made the entire git commit history public from the initial commit.

FWIW, WebKit's complete history is available in its Subversion repository, all the way back to the initial commits in 2001 when they were importing KHTML and convincing it to compile without Qt. Granted, there was around two years after Safari's initial release where Apple simply published source code drops, but the full code history has been public (first in CVS, then in SVN) since mid-2005.

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

#246
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…

> But somehow after nearly 6 years Objective-C stills feels better This experience is shared by basically nobody? I used to love Objective-C, which was unusual even before Swift, but I would not in a million years switch back to using it. Swift is so much better in every single way.

I share it. I love Objective-C and feel its a far superior language over Swift. Swift is too clever by half, with its var, let, func, and the god awful question marks. Objective-C is verbose sure, but that helps readability. I'll never switch to Swift, as Objective-C is so much better in every single way.

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

#247

Earlier quoted context omitted.

What would it provide that Qt + QML don't right now? (if we assume that the crossplatform GUI is the killer feature)

Hate to say it, but the sanest thing to do if you need a cross platform UI is use Java. Your other choice is Electron, which is way slower and uses many times as much ram

[deleted]

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

#248
post #177

Earlier quoted context omitted.

The official Apple tutorial gives you an idea what they were going for, but in practice it’s nowhere near that smooth. In fact, most of the time I found myself staring at a “type too complex, add annotation” error. That one doesn’t actually mean your type is too complex, it just means you’re passing the wrong thing somewhere and instead of a useful error message the compiler just gave up and broke.

Errors in SwiftUI are significantly better in the recently released Swift 5.2, so this is clearly something they’re working on.

I certainly hope so, because this was definitely on Swift 5.2 . In general if you come in expecting a dev experience anywhere close to writing React in Typescript using VSCode, SwiftUI and Xcode both are a bit of a disappointment - it's slow, it's glitchy, autocomplete kind of sucks, never mind tooling like Prettier which I take for granted now.

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

#249
post #47

Earlier quoted context omitted.

Swift wasn't originally open-source, either.

Not only did they announce that it would be open source immediately, unlike the source code dump they did with WebKit, Apple made the entire git commit history public from the initial commit.

Where? Here's the transcript of the initial announcement [1]. No mention of open source that I see.

Dr. Dobb's had an article in 2014 [2] which said "Swift is proprietary and closed: It is entirely controlled by Apple and there is no open source implementation."

EDIT: I found a HN post from 2015, just over a year after Swift was released, titled "Swift will be open source later this year" [3]. Not immediate at all.

[1]: https://asciiwwdc.com/2014/sessions/101 [2]: http://www.drdobbs.com/architecture-and-design/swift-objecti... [3]: https://news.ycombinator.com/item?id=9680982

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

#250
post #182

XCode (and hence most of the useful parts of using the Apple development ecosystem) as of v11.4 won't install on Macs running Mojave it's actually better, in my view, to use Mono/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 privilege of writing apps for Apple systems.

There are other editors for Swift out there, like AppCode. I do hate the fact that I'm forced to upgrade to a new OS version somewhere within half a year. Cataline was barely tolerable when I had to jump to it.

Xcode isn't just an editor. AppCode doesn't provide its own compiler and stdlib.
Post reply on HN