Live data from Hacker News

Swift Regrets

belkadan.com

21–30 of 207 posts

Re: Swift Regrets

#21

I don’t know if this is Swift’s fault, per se but I find Xcode to be a real pain to use. There’s something about the Apple Way for UI/UX that just doesn’t jive well with an IDE experience. I find myself constantly jockeying around the various windows and panes within Xcode that I usually never have to bother with inside of Visual Studio.

If you develop for iOS|macOS professionally, you may be interested in Jetbrains' AppCode [0].

Note: I'm not connected in any way to Jetbrains, and I have not used AppCode myself, but I used other tools from them, and they're quite competent, I'd say.

[0]: https://www.jetbrains.com/objc/

Re: Swift Regrets

#22
post #7

Before Swift/Kotlin our iOS team was way more productive than android. Everything was done in half the time. They both switched to new languages. Now it has flipped. Android does things in half the time the other team needs.

I've found similar results, although at the end of the day, iOS development is still faster overall.

Kotlin does a better job of getting out of the way when you need it to (compared to Swift), and Jetpack Compose is the real game-changer in terms of productivity.

That being said, there's a lot that you 'get for free' in iOS' frameworks, and APIs are generally more interoperable / batteries included. Both of these factors are what ultimately speed up iOS development.

Re: Swift Regrets

#23
post #17

Earlier quoted context omitted.

I find it hard to believe that anybody is faster coding in objc than swift, if you control for garbage code. It was easy to quickly write buggy messes in objc - swift made that a lot harder, and is also a much more ergonomic and productive language in my experience. I feel like there has to be some other factors at play if that’s the results you’re seeing. (Source: I’ve been doing objc since 2009, and swift since ver…

A well jelled team, with senior engineers can be much more productive with Objective C. But for beginners, swift looks less intimidating due to its syntax familiarity. The language pitfalls become apparent as you dive into it. Perhaps that’s why swift in ML and other areas failed. People don’t like the language. In iOS you are forced to use it. I hope the swift team does some hard thinking and start slashing features…

This just isn't true. Given equal familiarity, Swift will be vastly more productive at any skill level. Of course you can always tunnel deeper into more sophisticated solutions using Swift, since Obj-C lacks most of its capabilities, but that's hardly an equal comparison.

Re: Swift Regrets

#24
I'm surprised he doesn't bring up minor features that lead to huge compile time issues, like operator overloading and imports being module sized vs file or folder wide and type inference in some cases. Not to mention how the language doesn't actually scale that well with core count vs. many, many other programming languages. Throwing 64 cores / 128 threads at a C++ code base speeds up builds in a linear fashion during the compile step, in swift it does not and it tends to effectively max out at around 8 to 16-ish build threads. Even with 3 view toy apps made with SwiftUI on a M1 macbook is slow to build & run relative to it's size!

Honestly you would have gotten %80-%90 of the benefits of swift by making Obj-C use a new syntax that looked like swift and continued to improve Obj-C as a language than what you would have gotten with swift. A lot of the ugly of obj-c could have been translated away with very simple 1:1 syntactic sugar macros. And you would actually have fast, responsive compile and indexing times, unlike swift.

Re: Swift Regrets

#25

I don’t know if this is Swift’s fault, per se but I find Xcode to be a real pain to use. There’s something about the Apple Way for UI/UX that just doesn’t jive well with an IDE experience. I find myself constantly jockeying around the various windows and panes within Xcode that I usually never have to bother with inside of Visual Studio.

Not an apple user, but I've heard that xcode is an ide+build system. Which means that you can't compile an application if you don't have the exact version of xcode installed. How true is that?

Re: Swift Regrets

#26
post #20
post #14

Earlier quoted context omitted.

Don't forget kotlin. It is a really game changer.

Yeah, this sounds like a tooling issue. I have no difficultly believing Kotlin + Android Studio might be faster or more reliable than Swift + Xcode. Hard to say with any certainty though, it could be any number of things, if the perceived difference is even real.

From my outside looking in perspective:

* Android studio is reliable and just works.

* Kotlin is simple, easy to learn and productive.

* xcode is buggy and with their rapid pace of development it is just getting worse.

* Swift is complex. They had to rethink and redesign multiple times. Also the language was constantly changing under them.

Re: Swift Regrets

#27

I guess I was in the minority who loved Objective-C and it's selector syntax. I think my main objection to Swift is that it seems to be written by people who hate Objective-C and made the calling syntax much more complicated. I dearly wish a more mature F-Script had been the next Apple language. A lot of the other problems is Apple not providing good documentation and making sure sample programs continue to compile.…

I think that apple hated that at the end of the day, a lot of the system frameworks had to be written in objective-c++ which is not great.

NeXT had another point of view on that matter though, the original DriverKit was Objective-C.

Objective-C++ main point of existence, just like POSIX, was only to bring other software into the platform.

It is quite telling that only old timers have access to Objective-C++ docs.

Re: Swift Regrets

#28
post #23
post #17

Earlier quoted context omitted.

A well jelled team, with senior engineers can be much more productive with Objective C. But for beginners, swift looks less intimidating due to its syntax familiarity. The language pitfalls become apparent as you dive into it. Perhaps that’s why swift in ML and other areas failed. People don’t like the language. In iOS you are forced to use it. I hope the swift team does some hard thinking and start slashing features…

This just isn't true. Given equal familiarity, Swift will be vastly more productive at any skill level. Of course you can always tunnel deeper into more sophisticated solutions using Swift, since Obj-C lacks most of its capabilities, but that's hardly an equal comparison.

I have a lot of experience in both languages, and TBH it's just not true. I'm less productive in swift in many ways, mostly because of it's slow build and indexing times. It's infuriating.

You are still coding against the same UIKit and other apple libraries in both. SwiftUI has a chance to make it better, but it's incomplete and has bugs/gotchas that make it not as productive as UIKit when you run into that, which is pretty easy. But in an imaginary world where we got ObjectiveSwift instead, SwiftUI could have existed there and given the same productivity benefits.

Binary sizes ballooned because of the language. Binaries were significantly smaller in equivalent Obj-C programs than the swift ones, even when the standard swift library was finally baked into the OS.

Re: Swift Regrets

#29
post #24

I'm surprised he doesn't bring up minor features that lead to huge compile time issues, like operator overloading and imports being module sized vs file or folder wide and type inference in some cases. Not to mention how the language doesn't actually scale that well with core count vs. many, many other programming languages. Throwing 64 cores / 128 threads at a C++ code base speeds up builds in a linear fashion durin…

The main point of Swift was to create a memory-safe language Apple could use across its OSes. Trying to change Obj-C's syntax doesn't help with that goal.

Re: Swift Regrets

#30
post #23
post #17

Earlier quoted context omitted.

A well jelled team, with senior engineers can be much more productive with Objective C. But for beginners, swift looks less intimidating due to its syntax familiarity. The language pitfalls become apparent as you dive into it. Perhaps that’s why swift in ML and other areas failed. People don’t like the language. In iOS you are forced to use it. I hope the swift team does some hard thinking and start slashing features…

This just isn't true. Given equal familiarity, Swift will be vastly more productive at any skill level. Of course you can always tunnel deeper into more sophisticated solutions using Swift, since Obj-C lacks most of its capabilities, but that's hardly an equal comparison.

You are talking out of your arse… and so am I.

Unless we have well researched data, it is just a opinion.

My opinion and experience is definitely different than yours, and I have seen that objective c leads to more productive teams if they are mostly senior people. (With a couple of libraries (just some helper categories on strings and arrays) and some sparse macros objective c becomes a very productive language. But it takes a senior team to do that well).

Meanwhile with swift you feel you have to please the compiler at every! step? And it really doesn’t lead to much safer language anyway (swift bugs are different) and you feel you have to fight the compiler in every way.

Objective c is less fuzzy, and while it lets you do dumb/fast things (especially important during prototyping) it gives you a clear ‘you are doing x wrong’ warning which gives you the best of both worlds

Fast prototyping when you need it, and safety when you need to ship (you can have a production build fail on just warnings)

Post reply on HN