Swift Development

krycor

Honorary Master
Joined
Aug 4, 2005
Messages
18,539
Reaction score
2,113
Anyone doing swift development? I'm slowly getting into it and hoping it's better than objective-c haha
 
Anyone doing swift development? I'm slowly getting into it and hoping it's better than objective-c haha

At home, yes. Not at work. It will probably take awhile before recode any of our iPhone apps. Still on Xcode 5.1 at work.
 
I started with it, looks good so far, will feedback progress once i actually get somewhere with it.
 
Cool, I'm just starting with iOS dev so I figured maybe it's great that the language changed at the sametime
 
It's pretty damn similar syntacticly to objectivec. And objectivec isn't going anywhere
 
It's pretty damn similar syntacticly to objectivec. And objectivec isn't going anywhere

No semi colon to terminate statements. No header files. No synthesise. Different syntax passing parameter. Has tuples, extensions which obj c didn't have.

Looks more like other languages.
 
In away its kinda cool as it opens the playing field with everyone having semi equal footing :D
 
It's pretty damn similar syntacticly to objectivec. And objectivec isn't going anywhere

It would be interesting if the Watch SDK is Swift only.

Apple will support Objective C for a long time still, but Swift is the future.
 
In away its kinda cool as it opens the playing field with everyone having semi equal footing :D

Actually I am finding it really hard to avoid using objc classes completely. Although the syntax when instantiating an NS related object is so different. I guess it will be easier for those who have never used obj c to use Swift "cleanly". I often find myself backspacing those obj c square brackets away :D

There is a really good Swift tutorial at https://www.bloc.io/tutorials/swiftris-build-your-first-ios-game-with-swift#!/chapters/675

It shows excellent examples of using closures, computed properties and custom operators. Yes you can override freakin operators....

From apple dev https://developer.apple.com/library...t_Programming_Language/AdvancedOperators.html

Operator Functions

Classes and structures can provide their own implementations of existing operators. This is known as overloading the existing operators
 
Last edited:
Yip so I downloaded it last weekend and then this weekend another update which basically re-downloaded it
 
Yip so I downloaded it last weekend and then this weekend another update which basically re-downloaded it

Now that xcode 6 is in the app store we should be getting delta updates from here on out. The beta process is tough though on SA internet.
 
Now that xcode 6 is in the app store we should be getting delta updates from here on out. The beta process is tough though on SA internet.
Isn't it out of beta ? When I logged onto my MacBook it was already installed. I have auto updates on. I am referring to Xcode 6 for Mavericks, not Yosemite. You can submit apps with Swift to the apps store for iOS, but not OS x.
 
Isn't it out of beta ? When I logged onto my MacBook it was already installed. I have auto updates on. I am referring to Xcode 6 for Mavericks, not Yosemite. You can submit apps with Swift to the apps store for iOS, but not OS x.

Yes and No. Xcode 6 with Swift 1.0 is out of beta for iOS8, but Swift (as mentioned at WWDC) is under constant evolution; evolution that will proceed beyond Yosemite, and I'd expect this cycle of constant evolution, bug fixes, ... to continue to next year's WWDC and probably even further.
 
Last edited:
Anyone doing swift development? I'm slowly getting into it and hoping it's better than objective-c haha

Yip; have been spending an inordinate time coding in Swift since it's launch, and whilst I agree quite a bit of plumbing / specifically casting effort is required re all the iOS and OSX frameworks still being in Objective-C; most of which are being actively fixed with each new beta release. Challenges and problems aside, Swift is really such a joy to use over Objective-C (keep in mind I still love objc, C++ and C)

It's amazing to see how rapidly the language is evolving and how actively the team is taking notice of forums gripes, Is anyone else being impressed by how active Chris Lattner and his team are in Apple's Swift language forums? Issues and questions are usually responded to within solutions with 24hours, not forgetting the informative blog posts.

I agree any volatile environment is going to provide some hinderance or frustration for a few; however if you keep a keen eye on the release notes then the required code rewrites with each Swift release aren't anything more than a minor event.

I've moved quite a few projects over to Swift entirely, on the side line I'm currently busy with a marshalling class for JSON, similar to the one provided in Go (I.e. automatic reflection based deserialisation). I've got it working a simple class, and currently under way with a full featured complex JSON dataset in conjunction with for example class in class, ..., enum in class, ... structures.

As to some good Swift blogs to watch I'd suggest glancing at a few of these:
 
Last edited:
It's pretty damn similar syntacticly to objectivec. And objectivec isn't going anywhere

I'd agree only ito comparison with the frameworks (but that's a no brainer considering these exist today still only in Objective-C, C++ and C); that said it's still pleasing to see how much of they streamlined since it's release at WWDC.

As to the rest; it's arguably a lot closer to other languages than objc; as mentioned by Chris Lattner; it's inspiration came from Rust, Haskell, Ruby, Python, C#, CLU; to name a few.
 
Last edited:
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.
 
Went through the language guide ebook.. Wow this is very different from the 'old' languages in use to. Some of the things they do is just very new to me.. Like clojures.

The protocol thing seems like an interface and a few other items are all quite similar to things I've come across in Java or python (tuples).

Anyway this is going to take some getting use to.
 
Last edited:
Went through the language guide ebook.. Wow this is very different from the 'old' languages in use to. Some of the things they do is just very new to me.. Like clojures.

The protocol thing seems like an interface and a few other items are all quite similar to things I've come across in Java or python (tuples).

Anyway this is going to take some getting use to.

Having written Objective-C for the last 18 months and really enjoying the language, moving to Swift is a little scary to me. However I want to dive in as soon as possible with it. Change is good and this is why I love my job. Always challenging and always learning.

I will start using Swift in my own apps and nothing in production. So if it goes boom, oh well! :D
 
Top
Sign up to the MyBroadband newsletter
X