SWIFT, Why? Bangs head on desk...

Anyone else experienced in C++ and finding SWIFT an unnecesary evil? They could at least post their example code in both C++ and SWIFT. Not only to actually be helpful for experianced coders, but also to help those who are willing to transition. It also seems like a very forcefull move from Apple to enforce a vertical model. I personally will not learn SWIFT3.0 and am glad I didn't try to learn the first two already outdated releases. I will however, leave Apple and never look back. I'm offended that the last 10 years of my research and resources are being pushed aside for a language that never needed to happen. Feels like they just wanted to write an Apple exclusive language so they could bank on new lessons, and push developers away from anything Apple. I might add that my primary interests in coding are audio related and machine learning. Since most audio and machine learning code uses FFT and based on this( https://www.primatelabs.com/blog/2014/12/swift-performance/ )SWIFT/C++ speed performance test, I am very dissappointed with Apple's enforcement of SWIFT language. Also, not all of us develope for IOS. Sorry for the rant but I've been banging my head over their already limited example code and guides for weeks and I've just about had it. As with most Apple choices... if it's not broke, don't fix it. They need to provide example code in both SWIFT and C++ or they are going to lose yet another developer, and user for that matter. End rant.

Replies

Swift doesn't replace, or even compete against, C++. Instead, it's an advancement of, and potential replacement for, Objective-C.


The point is that C++ provides no direct access to the massive set of system libraries known as Cocoa. Obj-C does, and Swift does. (You can write in Objective-C++, which allows you to mix C++ and Obj-C syntax in a single source file, but I think that's not what you're referring to when you say "experienced in C++".)


So, if you've previously being using C++ on Apple platforms, there's no real reason to switch to Swift, unless you prefer to do so. If you've previously been using C++ on non-Apple platforms, and want to use (say) the various system audio frameworks, you would previously have been forced to code in Obj-C, and now can choose Obj-C or Swift.


Perhaps you could clarify why it seemed like you might want/need to switch to Swift at all?

I sympathize. I hate, I mean absolutely hate Swift. I don't understand it's appeal.


The language itself is getting better but it's just awful in my opinion, but everyone else seems to absosolutely love it so I'm keeping at it and trying to like it and assuming I'm missing something and that at any time I'll have an "ah hah!" moment where I figure out why everyone loves Swift...but I'm just not there yet. I really am trying to see the good in it though.


That being said you can still use C++ in XCode. I do it all the time.

Why speak as love or hate against a language ?


If you don't want to learn german, just speak english ! The same here. If you do not like Swift, stay with ObjC.


I understand, someone experienced in Obj C, may not really needed to learn Swift (I do not compare to C++ for the reason Quincey did explain). But if not, one question is : what is the easiest to learn: Swift or ObjC ?