5 ms·
I really like Swift as a language. To me it feels more elegant and less verbose than Objective C. However, the tooling around Swift is worse, so you have to l
by gregkerzhner 7y ago
I really like Swift as a language. To me it feels more elegant and less verbose than Objective C. However, the tooling around Swift is worse, so you have to live with longer compile times and other random bugs. This drawback is still not enough to make me go back to Objective C. Also, I am not sure I get the argument about ecosystem - you can easily include Objective C dependencies into Swift projects.
- asaph 7y ago> Swift is worse, so you have to live with longer compile times Is this truly a factor? Aren't the vast majority of mobile apps relatively modest in scope due to the very nature of the platform? How long does it take to compile an average Swift app?
- rimliu 7y agoI doubt it. It was worse but now just good enough not to care too much.
- saagarjha 7y agoDepends on your scale. A clean build of my medium-sized app takes a couple of minutes on my machine, but most large apps rely on dozens of frameworks and have lots of code in them and can take tens of minutes to build.
- pixelrevision 7y agoSwift can be pretty bad due to how much the compiler wants to guarantee. Doing certain things can also really make it take a long time (like doing a ton of casting on a dictionary). I personally think it’s worth it and saves me a ton of time other places but I do have warnings for most of my projects for if a function is taking too long to compile.
- mpweiher 7y ago> Is this truly a factor? Yes. Every Swift project I am aware of fights with this problem. Two of the CocoaHeads Berlin talks in the last year or so were about workarounds for slow Swift compile times. For one, I computed the compile speed for the frameworks in question, it turned out to be in the double digits of lines / second. That's not bad, that's truly horrific, starting to get into "transcribe into machine language by hand"-joke territory. The other talked about splitting all their UI features up into little mini-frameworks in order to be able to work on this one feature in isolation without having to compile the rest of the app. While I am a great fan of framework-oriented development, that's not really how that's meant...