Swift.berlin, this time kindly hosted by Wooga, invited Crispy's own Christian Weyer to speak about whether Apple's new programming language Swift is ready for primetime use in corporate, production environments. In order to answer that question, Christian ported an existing OS X application to Swift and created a new iOS application from scratch. Watch the video to see his results and the conclusions he drew from these experiences.
Video available at https://vimeo.com/113089291
37. class Channel: NSObject, ActivityScope {
let recording: Recording
var activities: Array<Activity> = [Activity]()
var spikes: Array<Spike> = [Spike]()
var voltages: Array<Double> = [Double]()
var times: Array<Double> = [Double]()
41. func addChannel(channel: Channel) {
// Make sure UI updates are done in the main queue
dispatch_async(dispatch_get_main_queue(), {
self.willChangeValueForKey("channels")
self.channels.append(channel)
self.didChangeValueForKey("channels")
})
}
53. New public GitHub repositories per month 0
2250
4500
6750
9000
April 2008
August 2008
December 2008
April 2009
August 2009
December 2009
April 2010
August 2010
December 2010
April 2011
August 2011
December 2011
April 2012
August 2012
December 2012
April 2013
August 2013
December 2013
April 2014
August 2014
Objective-C
54. New public GitHub repositories per month 0
2250
4500
6750
9000
June 2014
July 2014
August 2014
September 2014
October 2014
Objective-C
Swift
60. var columns = (line as NSString).componentsSeparatedByString(“t")
// original is in ms
currentTime = columns[0].doubleValue / 1000.0
// original data is in micro volts;
voltage = columns[1].doubleValue / 1000000.0
67. Support all green
Learning curve, language
accessibility
all green
Libraries & Ecosystem
much bridging, no Cocoapods,
Apple has work to do
Execution speed slower than Obj-C