Live data from Hacker News

Swift's Evolution

carpeaqua.com

61–70 of 105 posts

Re: Swift's Evolution

#61
The author mentions that Apple often nudge their idea of the future forward each year at WWDC. I see no different with Swift: the introduction of Playgrounds, teaching resources, finesse over small details, etc - to me indicate Apple wants to make this a language that the next generation of developers grow up learning and using.

Quite a good move on their part if it is successful. If kids start learning Swift at school, they get exposed to Apple devices (not necessarily but this is where the teaching resources are aiming), and they've got developers in their arena from an early age.

Yeah, Swift needs ABI stability, but I also understand that they don't want to screw it up by adding it too soon. Because the goal of Swift seems more long term oriented, short term ABI stability isn't worth risking a 10 year goal for.

Re: Swift's Evolution

#62
post #35

I think the author misses the fact that Swift wasn't truly 'done' when it was introduced, (and still isn't). Objective-C had some 30+ years to evolve, but Swift can't have 3? I get that if you're shipping Swift in production you want to refactor as little as possible, but it is pretty hard to come up with the ideal design straight out of the gate. Swift can stop evolving, but it will be THEN when it loses the reason…

Its fair to say that if you adopted Swift as soon as it was announced you should have expected some pain, especially given all the warnings Apple put out about it. I think the issue is that for the last year or two all of the tutorial websites and the third party library ecosystem have moved from Objective-C to Swift in a big way. If you are new to iOS development this might lead you to have a false sense of security…

It's definitely annoying that most of the major online iOS learning resources are no longer updating their Objective-C material.

Re: Swift's Evolution

#63
post #57
post #30

Earlier quoted context omitted.

Anyone shipping swift code one day one had to be pretty masochistic. I just couldn't understand why people were doing it. It was obviously not ready for production use, and still isn't. But I'm happy that people are playing with it and the language is being refined so that I can start using it in a few years.

> Anyone shipping swift code one day one had to be pretty masochistic. I just couldn't understand why people were doing it. It was obviously not ready for production use, and still isn't. Obviously because "production" is not some monolithic reality. What's "production" standards for NASA or Google, might not be for some small team making an iOS app or an one-person indie shop. They might prefer to experiment with th…

> They might prefer to experiment with the language in their app, and get a leg up on learning it starting from the initial release, even if there's gonna be pain.

I agree, but I suppose these kinds of shops wouldn't then write blog posts complaining about this, I think the OP meant shops that do it anyway and then complain...

Re: Swift's Evolution

#64
post #38
post #16

I'm actually pretty happy swift moves the server side story forward, because i'm convinced the "next big language" will have to run on mobile and server. Actually, i think they don't go fast enough, especially regarding concurrency ( which on the server goes beyond just providing async await, as lattner said they were aiming at something closer to the actor model). I don't think the "maybe objc is still relevant for…

> because i'm convinced the "next big language" will have to run on mobile and server Wouldn't it also need to be cross-platform in that case? It's sad that Kotlin and Swift are so similar but not similar enough. (Although I'd prefer a dynamic language to be the "next big language" - it seems the pendulum is currently swinging back towards static typing...)

> Wouldn't it also need to be cross-platform in that case?

Swift is absolutely cross-platform. I've used it a lot on Linux. I think I even prefer it to Rust for things like server applications.

I think Swift may even be available on Windows now. But it's definitely available and rapidly maturing on Linux.

And having struggled with large code bases in dynamic languages for years, I'm very happy that statically-typed languages are resurgent now.

Re: Swift's Evolution

#65
post #10

Will Kotlin Native be able to compete with Swift on iOS? The syntax is very similar and it would make for a nice cross platform PL. I was holding off on Swift to see where it was going, but I'd like to add iOS to my dev targets. Objective-C was too verbose for me years ago, but I've heard it has changed a bunch.

Kotlin Native doesn't exist beyond pre-alpha software at this point, so the the question is a bit premature. In 3-5 years Kotlin might be where Swift is now, but there's nothing guaranteed, just coming up with a GC solution alone is a gigantic engineering effort -- Kotlin, like Scala, Clojure, etc. all benefit from world class GCs, just by being hosted on the JVM. With LLVM you essentially start from scratch, same fo…

Please nobody cut corners with React "Native" or other some such nonsense.

Re: Swift's Evolution

#67
post #30

I think the author misses the fact that Swift wasn't truly 'done' when it was introduced, (and still isn't). Objective-C had some 30+ years to evolve, but Swift can't have 3? I get that if you're shipping Swift in production you want to refactor as little as possible, but it is pretty hard to come up with the ideal design straight out of the gate. Swift can stop evolving, but it will be THEN when it loses the reason…

Anyone shipping swift code one day one had to be pretty masochistic. I just couldn't understand why people were doing it. It was obviously not ready for production use, and still isn't. But I'm happy that people are playing with it and the language is being refined so that I can start using it in a few years.

Because Swift 1.0 was far superior to Objective C in maintainability and code quality.

Now I do admit the build times were awful and I had a couple puzzling crashers that were only cleaned up by Swift 1.2 (thankfully didn't ship till after 1.2 was final), but the transition was worth it.

Re: Swift's Evolution

#68
post #50
post #33

Earlier quoted context omitted.

Developers are shipping both small and large projects with Swift. You may have a different opinion, for reasons that you haven't stated, but shipping production Swift apps is not an anomaly.

It's fine if you don't mind using rudimentary, buggy tools, and converting your whole code base to the latest language changes every 6 months, and you don't mind bloating your app with a mandatory 8Mb runtime. Great for small projects, people coding for fun, learners, and early adopters/neophiles who enjoy keeping up with all the changes. But substantial projects need solid, stable tools. Swift will get there very so…

I shipped my first Swift App with version 1.2, and have written or helped write a half dozen since. Anyone who is still using Objective C and dealing with dangling pointer bugs and difficult to maintain code is missing the point that most software development is bug fixing and maintenance.

I never have the IDE crash and haven't for the last year+, never have problems with compiler bugs. Autocomplete is fine, compile times are ok, and the changes for each version have almost always been automatically converted for me.

Refactoring would be nice. A faster compiler would be very nice, but there are build settings (see Uber lead engineers recent blog) that can massively improve build times in large apps.

Re: Swift's Evolution

#69
post #64
post #38

Earlier quoted context omitted.

> because i'm convinced the "next big language" will have to run on mobile and server Wouldn't it also need to be cross-platform in that case? It's sad that Kotlin and Swift are so similar but not similar enough. (Although I'd prefer a dynamic language to be the "next big language" - it seems the pendulum is currently swinging back towards static typing...)

> Wouldn't it also need to be cross-platform in that case? Swift is absolutely cross-platform. I've used it a lot on Linux. I think I even prefer it to Rust for things like server applications. I think Swift may even be available on Windows now. But it's definitely available and rapidly maturing on Linux. And having struggled with large code bases in dynamic languages for years, I'm very happy that statically-typed l…

I would like to see Swift for WebAssembly

Re: Swift's Evolution

#70
post #30

Earlier quoted context omitted.

Anyone shipping swift code one day one had to be pretty masochistic. I just couldn't understand why people were doing it. It was obviously not ready for production use, and still isn't. But I'm happy that people are playing with it and the language is being refined so that I can start using it in a few years.

Because Swift 1.0 was far superior to Objective C in maintainability and code quality. Now I do admit the build times were awful and I had a couple puzzling crashers that were only cleaned up by Swift 1.2 (thankfully didn't ship till after 1.2 was final), but the transition was worth it.

> Because Swift 1.0 was far superior to Objective C in maintainability and code quality.

You can take Objective-C code written three years ago, open it up in Xcode today, and compile it. The same cannot be said for Swift. So saying Swift 1.0 was "far superior" in terms of maintainability is a bit of a stretch, in my opinion.

Post reply on HN