Apple Watch and Swift

Apple Watch and Swift

It seems to me pretty likely that 3rd party programming for the Apple Watch is only likely to be supported in Swift.


It's a chance for Apple to start changing the way Cocoa APIs look.

Lots of the syntax for Swift is driven by the need to be as compatible as possible with Objective-C based cocoa.

We wouldn't have method signatures which look like

tableView(tableView: UITableView?, numberOfRowsInSection section: Int) -> Int

if it wasn't for a need to maintain this compatibility - the main oddness being the placement of the first parenthesis.

(The equivalent in Objective-C is

- (NSInteger) tableView:(UITableView *)tableView numberOfRowsInSection(NSInteger)section

I expect to see a Swift only Watch API, with a larger use of Swift only language features (especially closures), which frees the API designers from the limitation of having to design for two languages.