Stories
Slash Boxes
Comments

SoylentNews is people

posted by martyb on Sunday June 14 2015, @10:44PM   Printer-friendly
from the swift-rise-in-popularity dept.

The hype around Swift is near non-existent by Apple standards, yet the language has attracted high praise since its release last year. Swift is essentially one of the very few Apple products representing a clear departure from the hardware-led approach Steve Jobs took to the business. If Stack Overflow's 2015 dev survey is anything to go by, it looks as if the Swift language might have potential to really shake things up.

Might the days of Apple programmers relying upon objective C be numbered?


Original Submission

 
This discussion has been archived. No new comments can be posted.
Display Options Threshold/Breakthrough Mark All as Read Mark All as Unread
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
  • (Score: 5, Informative) by fleg on Monday June 15 2015, @03:34AM

    by fleg (128) Subscriber Badge on Monday June 15 2015, @03:34AM (#196343)

    ok, first some context, i have about 15 years of c++, around 7 of java, couple of years c#

    My guess is that Swift is on the interesting to learn list because developers want to program the iPhone.

    that was the case for me. it just happened that the place i'm at decided to write an app at about the same time swift came out. i'd looked at obj-c before and just couldnt get past the syntax, its ugly as sin. so i decided to go with swift. i hadnt used xcode before either. wind forward almost a year and i must say its been an absolute joy. xcode doesnt have the sweet refactoring options that say netbeans and java does but its not that big a deal, because everything else makes up for it (including a vim-like plugin).

    when i first started using it i can remember thinking it was like a scripting language version of java, or put another way like they'd taken the best bits of java and c# and thrown in some ruby. but after a while you start to see the underlying c'ness to it, this is not java or c# there is no vm underneath it, there's a linker, you dont have write makefiles, but there are targets and so on. this is all nicely handled for you by xcode but its there.

    So how is the bloat factor and overload in Swift? C++ seems to suffer from them.

    i wouldnt say it feels bloated but it does feel like a big language in a way that java doesnt. i came to java from c++ and loved the way i could just forget a whole bunch of stuff. with swift i find myself much more in that c++ frame of mind, as in "hmmm this corner case of the language? what happens here again?" you have to remember more, its funkier than java. having said that, going back to java after doing swift is really painful, it feels incredibly verbose.

    downsides? when it dies in the arse the error messages are enough to make you weep, we're back in the land of awk "bailing out at line 1" kind of thing. the constructor inheritance rules are rather painful. its still very new, and whilst it has been getting better, there's still some clunkiness, for instance the interface to the obj-c stuff, its still a bit hit and miss on when you use swifts nil or obj-c's NSNULL. also i would have liked to see true multiple inheritance, i miss mixins.

    i dont think it will completely replace java because there is too much c++ type discipline required, but i think it may fill a very useful niche, where you dont really have the justification to write c++ but you want something that isnt as unwieldly as java yet gives you some help.

    Starting Score:    1  point
    Moderation   +4  
       Interesting=1, Informative=3, Total=4
    Extra 'Informative' Modifier   0  
    Karma-Bonus Modifier   +1  

    Total Score:   5