Live data from Hacker News

Swift 5: start your engines

lists.swift.org

31–40 of 186 posts

Re: Swift 5: start your engines

#31

Earlier quoted context omitted.

You should definitely try rust, it's better than its counterparts, rapidly growing, memory safe language with utmost priority on efficiency. Plus its cross-platform too :)

Are all of your comments about Rust?

There's a reason a meme exists about Rust afficionados on HN.

Re: Swift 5: start your engines

#32
post #28
post #15

Can someone with Swift experience comment on the status of Swift on non-Apple platforms? Is it being used outside of the Apple ecosystem? How is the tooling, deployment, availability/support, etc.

Victim of trying it the first week it came out, having to call down into C for anything POSIX, and giving up. If you don't have POSIX bindings, don't call yourself v 1.0.

What exactly do you mean "call down into C"? You should be able to call C functions directly from Swift, albeit with UnsafePointer and the like.

Re: Swift 5: start your engines

#33
post #2

I wish more effort were being made to make it a first class citizen on non-Apple platforms. With the popularity it has enjoyed, it could easily challenge the likes of Go, Python or even Java for server side programming.

Swift is open-source. You are welcome to contribute support for other platforms!

I am talking about "official" support here. Enterprises are not going to risk using an unofficial port. And unless there is a large scale adoption, it will become another niche language which only the enthusiasts would care about.

More importantly, it needs to happen while Swift still has momentum. Once a language gets old enough, it builds a certain kind of reputation. Once that happens, it is almost impossible to introduce it into new domains.

Re: Swift 5: start your engines

#34
post #7

Swift developers, how is the evolution of the programming language now? does it still have backwards compatibility issues or things are more stable now (and will be with this new proposals)?

I started out building prototypes with Swift 2. The migration to 3 caused a few headaches for me, and some migraines for others it seems. 3 -> 4 was relatively simple. Though, my experience was far less involved than those depending on Carthage/CocoaPods packages.

Re: Swift 5: start your engines

#35
post #11
post #3

Maybe someone will explain this to me. Does Swift use this confusing "rapid release" versioning? Does Swift 4 break backwards compatibility with Swift 3? In my company people are looking for a language to rewrite some legacy Objective-C to. Swift is often discarded as "unstable" because of these major version bumps. Compare this to Go, which, seven or so years after the initial release is still 1.x and still doesn't…

Swift has a clear policy on this, but basically: it's worth breaking things early on rather than freeze in bad design decisions. They provide a code migrator to help with this pain. However , this was only in the early releases. The plan is to stop breaking changes soon and freeze the ABI. They're a little behind schedule for this, but it should happen soon.

To expand on this, from the linked post:

> First, ABI stability is the center focus of Swift 5 — and we will pivot much of our prioritization of efforts for Swift 5 around it. With Swift 4, ABI stability was a strong goal. In Swift 5, it is a requirement of the release. Whatever ABI we have at the end of Swift 5 is the ABI that we will have. ABI stability is an important inflection point for the maturity of the language, and it cannot be delayed any longer.

> ...

> Module stability is a stretch goal for Swift 5, but even without module stability we can still achieve the primary value of ABI stability.

Re: Swift 5: start your engines

#36
post #28

Earlier quoted context omitted.

Victim of trying it the first week it came out, having to call down into C for anything POSIX, and giving up. If you don't have POSIX bindings, don't call yourself v 1.0.

What exactly do you mean "call down into C"? You should be able to call C functions directly from Swift, albeit with UnsafePointer and the like.

I assume, they mean that you don't need to have C at all. See how Go for example doesn't require C on most platforms to make syscalls (IIRC, the exceptions are Windows and Solaris).

Re: Swift 5: start your engines

#37
One of the problems I find with Swift is that Apple doesn't go back and properly update their sample code at developer.apple.com. They have examples that will not build. If you search you can find folks that have patch sets, but they really need to fix the examples.

Re: Swift 5: start your engines

#38
post #22
post #16

Earlier quoted context omitted.

You don't have to "rewrite the app". You run the migrator, then fix up what it didn't migrate. Swift 3 was notorious for having migrator issues, largely due to the fact that it was a pretty radical change and a huge number of method names were changed. Personally, on our hybrid app, the migrator did about 1/3rd of the work, and I did the rest, without any other engineers' involvement. Overall it took maybe 3 days to…

It was a way of talking. I said it that way because the migration to swift and from swift 1 to swift 2 we had the double of developers for iOs than Android and still have to wait for them because of so many issues they were having. Seems like things are not that bad now. But stills scares me that with every new version you lose a developer for some days (or weeks).

It really doesn't take all that long. I've migrated apps consisting of 20K-30K lines of code in a couple hours–mind you, many of the changes were not due to Swift 4, but those in the Cocoa/Cocoa Touch Swift overlays.

Re: Swift 5: start your engines

#39

One of the problems I find with Swift is that Apple doesn't go back and properly update their sample code at developer.apple.com. They have examples that will not build. If you search you can find folks that have patch sets, but they really need to fix the examples.

File a Radar and someone will get around to fixing it: http://bugreport.apple.com/

Re: Swift 5: start your engines

#40
post #2

I wish more effort were being made to make it a first class citizen on non-Apple platforms. With the popularity it has enjoyed, it could easily challenge the likes of Go, Python or even Java for server side programming.

The linked post talks about concurrency not being a focus until Swift 6 at the earliest. Personally, I don't want to make a commitment to server-side Swift until after that dust has settled.
Post reply on HN