Swift Development

I haven't started with Swift and I certainly will not be re-writing my current project in Swift. Two reasons for that:

1. Swift is not ready for a production environment as far as I am conceded. (Apple constantly changing and fixing bugs in the language at this point in time )
2. Switching to Swift in the current project will have zero benefit.

However future projects I may start with Swift.

Concerned.
 
Almost a year on. When i used swift for a few demo stuff (nothing major) one of the annoying things i found tht a lot of code is still Obj-C which sucks if u don't know it. Hoping it ha improved now with the new releases
 
Almost a year on. When i used swift for a few demo stuff (nothing major) one of the annoying things i found tht a lot of code is still Obj-C which sucks if u don't know it. Hoping it ha improved now with the new releases

It is getting better. And the tutorials are becoming mainstream.

My first commercial app is nearly ready. Started off as boredom and started programming again after 10 years
 
Almost a year on. When i used swift for a few demo stuff (nothing major) one of the annoying things i found tht a lot of code is still Obj-C which sucks if u don't know it. Hoping it ha improved now with the new releases

It's important to remember that Cocoa and iOS frameworks were originally Objective-C, C and C++ only frameworks, however Swift 2.0 framework interop has advanced far enough for you to build complex applications without the need to revert to a single line of Objective-C or C.

As a plus point most of the Cocoa & iOS frameworks have been simplified in the process of building the interop.

Documentation has also finally caught up so you can e.g. look up the Swift syntax for Framework APIs without the need to understand any Objective-C, however usage of C based frameworks will still require an understanding of C types and memory management, but that's no different in languages like C# or Python; C interop usage always requires this understanding. Swift however with ARC, usually does this automatically., the cases where you need to use malloc and free is significantly far less than it was a year ago.

Typically the only time that you need to revert to writing Objective-C is when you need to interface with C++ or interface with some older C API, that Swift interop hasn't been built yet, but that's not surprising considering the complexity of C++ multiple inheritance and the mammoth C API (even C#, python don't support this that well). Btw covariance and contravariance has been also been delivered in the latest 2.1 beta,; full-featured support will however require time, for example: C# only delivered covariance / contravariance in .NET v4 (4 years after its launch)
The approach in these scenarios is usually to build code directly in C++, C and create a wrapper in Objective-C, thereafter Swift usage is simple.

In summary whole complex applications can be built in Swift only, the cases that require C, C++ or Objective-C usage are rare re most of the regular used API interop is feature complete. As example Venmo cnverted their app to Swift from Objective-C and reduced their code significantly (44000 lines to 16000)

That said I love the idea of being able to mix all 4 language sets in a single project.
 
Oh and in answer to your question re usage; I tend to program primarily on Swift these days; but not completely as I have a number projects to maintain in Java, C#, Objectice-C , C, C++, etc... but I'm hopeful much of this will be converted to Swift in time; progress should pick up after it lands on Linux later this year.
 
Top
Sign up to the MyBroadband newsletter
X