$30 off During Our Annual Pro Sale. View Details »

A Swift TImeLapse - UIKonf 2016

A Swift TImeLapse - UIKonf 2016

As we come to the end of the first two years of Swift being public, we take a look back at where we've come from and the Open Source experience as we prepare for the Swift 3 release.

dimsumthinking

May 24, 2016
Tweet

More Decks by dimsumthinking

Other Decks in Programming

Transcript

  1. UIKonf 2016

  2. Us

  3. Community

  4. Together

  5. A Time Lapse View of Swift UIKonf 2016 Daniel H

    Steinberg @dimsumthinking
  6. 0 .. 2

  7. 0 ..< 2

  8. -5 ..< 0

  9. ~ 20 OCE

  10. -5 BS

  11. Objective - C is so old fashioned

  12. Objective - C is so old fashioned It's Holding us

    Back
  13. Objective - C is so old fashioned It's Holding us

    Back It has Square Brackets
  14. Objective - C is so old fashioned It's Holding us

    Back It has Square Brackets It doesn't have Garbage Collection
  15. Objective - C is so old fashioned It's Holding us

    Back It has Square Brackets It doesn't have Garbage Collection Wah wah wah
  16. BS

  17. None
  18. Swift

  19. Objective - C

  20. #import "MasterViewController.h" #import "DetailViewController.h" #import "Search.h" #import "TextInputViewController.h" @interface MasterViewController

    () @end @implementation MasterViewController - (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view, typically from a nib. self.navigationItem.leftBarButtonItem = self.editButtonItem; self.detailViewController = (DetailViewController *)[[self.splitViewController.viewControllers lastObject] topViewController]; } - (void)viewWillAppear:(BOOL)animated { self.clearsSelectionOnViewWillAppear = self.splitViewController.isCollapsed; [super viewWillAppear:animated]; } - (void)insertNewSearchTerm:(NSString *)searchTerm { NSManagedObjectContext *context = [self.fetchedResultsController managedObjectContext]; NSEntityDescription *entity = [[self.fetchedResultsController fetchRequest] entity]; Search *newSearch = [NSEntityDescription insertNewObjectForEntityForName:[entity name] inManagedObjectContext:context]; newSearch.term = searchTerm; newSearch.timeOfLastSearch = [[NSDate alloc] init]; newSearch.hasBeenSearched = NO; NSError *error = nil; if (![context save:&error]) { NSLog(@"Unresolved error %@, %@", error, [error userInfo]); abort(); } } #pragma mark - Segues - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { //... if ([[segue identifier] isEqualToString:@"showDetail"]) { NSIndexPath *indexPath = [self.tableView indexPathForSelectedRow]; Search *search = [[self fetchedResultsController] objectAtIndexPath:indexPath]; DetailViewController *controller = (DetailViewController *)[[segue destinationViewController] topViewController]; [controller setSearch: search]; controller.navigationItem.leftBarButtonItem = self.splitViewController.displayModeButtonItem; controller.navigationItem.leftItemsSupplementBackButton = YES; } else if ([segue.identifier isEqualToString:@"showSearchInput"]){ TextInputViewController *textInputVC = segue.destinationViewController; textInputVC.title = @"Search Term"; textInputVC.placeholderText = @"Enter search term"; textInputVC.cancel = ^{ [self dismissViewControllerAnimated:YES completion:nil]; }; textInputVC.save = ^(NSString *text){ [self insertNewSearchTerm:text];)tableView { return [[self.fetchedResultsController sections] count]; }
  21. ;

  22. [super viewDidLoad];

  23. [[self.fetchedRC fetchRequest] entity];

  24. NSEntityDescription *entity = [[self.fetchedRC fetchRequest] entity];

  25. #import "MasterViewController.h"

  26. #import "MasterViewController.h"

  27. Objective - C is so old fashioned It's Holding us

    Back It has Square Brackets It doesn't have Garbage Collection Wah wah wah
  28. -5 ..< 0

  29. "Apple does not comment on unreleased …"

  30. Retina Display

  31. Different Aspect Ratios

  32. Processor Changes

  33. "Apple does not comment on unreleased …"

  34. If you pay attention

  35. "Use pixels not points"

  36. "Use NSInteger not int"

  37. "Adopt Autolayout"

  38. Then you realize

  39. While this is happening …

  40. http://www.phonearena.com/news/Steve-Jobs-probably-would-have-liked-the-Apple-Pencil_id73815

  41. They were already working on …

  42. None
  43. While this is happening …

  44. Objective - C is so old fashioned It's Holding us

    Back It has Square Brackets It doesn't have Garbage Collection Wah wah wah
  45. They were already working on Swift.

  46. They should have told us

  47. You can usually look back and see

  48. Autolayout …

  49. Phones with different sizes and aspect ratios.

  50. NSInteger and int …

  51. 64 bit

  52. Pixels not points …

  53. Retina display

  54. NSArray *myArray = [[NSArray alloc] initWithObjects:@"one", @"two", @"three", @"four", nil];

  55. NSArray *myArray = @[@"one", @"two", @"three", @"four"];

  56. let myArray = ["one", "two", "three", "four"]

  57. NSString *two = [myArray objectAtIndex: 1];

  58. NSString *two = myArray[1];

  59. let two = myArray[1]

  60. You can look back and see what is coming.

  61. 0 SE

  62. WWDC 2014

  63. Swift is Released

  64. They Should have released it earlier and shown us what

    they were working on
  65. They Should have released it earlier and shown us what

    they were working on They should have released it later when it was ready.
  66. it's not open source They Should have released it earlier

    and shown us what they were working on They should have released it later when it was ready.
  67. "We haven't thought about it."

  68. You can look back and see what is coming.

  69. let myArray: Int[]

  70. let myArray: [Int]

  71. Willing to shake off the past.

  72. let myArray = [1, 2, 3]

  73. let myArray = [1, 2, 3] myArray[1] = 7

  74. That's not what "Let" Means.

  75. let myArray = [1, 2, 3] myArray[1] = 7

  76. let myArray = [1, 2, 3] myArray[1] = 7

  77. var myArray = [1, 2, 3] myArray[1] = 7

  78. Willing to change in response to community feedback.

  79. You can look back and see what is coming.

  80. 1 SE

  81. WWDC 2015

  82. "Swift will be open sourced by the end of this

    year."
  83. End of November, 2015

  84. Apple promised Open Source. They Didn't open source Swift yet.

    They failed.
  85. Just shut up

  86. Just shut up

  87. Apple promised Open Source. They Didn't open source Swift yet.

    They failed.
  88. End of November, 2015

  89. "Swift will be open sourced by the end of this

    year."
  90. "Swift will be open sourced by the end of this

    year."
  91. December 3, 2015

  92. None
  93. "Swift will be open sourced by the end of this

    year."
  94. Look at the license. It's not "really" Open Source.

  95. Open?

  96. Open?

  97. None
  98. Proposals from the community

  99. PR from the community

  100. Committers

  101. Conversation

  102. Apple is listening

  103. really listening

  104. Sometimes the Core Team decides differently.

  105. See? I told you It's not "really" Open Source.

  106. I won't argue.

  107. Apple is listening

  108. Apple is responding

  109. Apple is sharing

  110. Core Team: why

  111. Core Team: what we're thinking

  112. Core Team: plans

  113. None
  114. None
  115. None
  116. Swift 3

  117. Stable ABI Resilience Portability Type system cleanup and documentation Complete

    generics Focus and refine the language API design guidelines
  118. Stable ABI Resilience Portability Type system cleanup and documentation Complete

    generics Focus and refine the language API design guidelines
  119. Stable ABI Resilience Portability Type system cleanup and documentation Complete

    generics Focus and refine the language API design guidelines
  120. Stable ABI Resilience Portability Type system cleanup and documentation Complete

    generics Focus and refine the language API design guidelines
  121. Stable ABI Resilience Portability Type system cleanup and documentation Complete

    generics Focus and refine the language API design guidelines
  122. Stable ABI Resilience Portability Type system cleanup and documentation Complete

    generics Focus and refine the language API design guidelines
  123. Stable ABI Resilience Portability Type system cleanup and documentation Complete

    generics Focus and refine the language API design guidelines
  124. May 16, 2016

  125. Chris Lattner

  126. "As we get deeper into the Swift 3 release cycle,

    we’re beginning to have a more precise understanding about what the release will shape up to be."
  127. "This release […] will redefine the feel of Swift and

    make a major leap towards maturing the Swift language and development experience. "
  128. "We have had a focus on getting to source stability,

    with the forward-looking goal of making Swift 4 as source compatible with Swift 3 as we can[…]. It tackled API naming head on […], made major improvements to the consistency and feel of the language.…"
  129. "We have had a focus on getting to source stability,

    with the forward-looking goal of making Swift 4 as source compatible with Swift 3 as we can[…]. It tackled API naming head on […], made major improvements to the consistency and feel of the language.…"
  130. "We have had a focus on getting to source stability,

    with the forward-looking goal of making Swift 4 as source compatible with Swift 3 as we can[…]. It tackled API naming head on […], made major improvements to the consistency and feel of the language.…"
  131. "We have had a focus on getting to source stability,

    with the forward-looking goal of making Swift 4 as source compatible with Swift 3 as we can[…]. It tackled API naming head on […], made major improvements to the consistency and feel of the language.…"
  132. Stabilize the language.

  133. Apple is listening

  134. "That said, it is also clear at this point that

    some of the loftier goals that we started out with aren’t going to fit into the release"
  135. "including some of the most important generics features needed in

    order to lock down the ABI of the standard library."
  136. "the generics and ABI stability goals will roll into a

    future release of Swift, where I expect them to be the *highest* priority features to get done."
  137. The world is ending

  138. None
  139. We are here

  140. What's the rush?

  141. Big here

  142. Long now

  143. Now: Stabilize the language.

  144. Next: Finish generics while we play with the wealth of

    changes that have been added.
  145. I'm glad the binary isn't set yet.

  146. What changes are still in scope?

  147. "The highest priority to me is to get the 'little

    syntactic stuff' done […] because it affects source stability."
  148. "The highest priority to me is to get the 'little

    syntactic stuff' done […] because it affects source stability."
  149. "The highest priority to me is to get the 'little

    syntactic stuff' done […] because it affects source stability."
  150. Open

  151. Transparent

  152. Disappointing is my first thought, in fact worrying. Two years

    after the language was announced, the ABI is still not stable.
  153. Of the original […] seven goals [Only two Will] be

    achieved in Swift 3, this looks like failure.
  154. Failure?

  155. Community Response

  156. Swift 3 initial scope was determined prior to the input

    of the Swift Evolution community, just as it was being Open Sourced. The fact they are open to changing timelines and ensuring we get fundamentals of the language sorted is a testament to their commitment to the quality of Swift as a whole.
  157. Swift 3 initial scope was determined prior to the input

    of the Swift Evolution community, just as it was being Open Sourced. The fact they are open to changing timelines and ensuring we get fundamentals of the language sorted is a testament to their commitment to the quality of Swift as a whole.
  158. Swift 3 initial scope was determined prior to the input

    of the Swift Evolution community, just as it was being Open Sourced. The fact they are open to changing timelines and ensuring we get fundamentals of the language sorted is a testament to their commitment to the quality of Swift as a whole.
  159. Greg Parker Runtime Wrangler

  160. "We apologize for the inconvenience."

  161. "The OS X and iOS architecture transitions demonstrate the two

    fundamental laws of ABI changes:"
  162. "1. Opportunities to break ABI compatibility are rare."

  163. "2. Any opportunity to break ABI compatibility will suffer from

    severe schedule pressure."
  164. "If we tried to rush Swift ABI stability out the

    door for Swift 3 we would certainly end up with deliberate or accidental flaws[…] Being able to take the time to get it right is a rare luxury."
  165. "If we tried to rush Swift ABI stability out the

    door for Swift 3 we would certainly end up with deliberate or accidental flaws[…] Being able to take the time to get it right is a rare luxury."
  166. "If we tried to rush Swift ABI stability out the

    door for Swift 3 we would certainly end up with deliberate or accidental flaws[…] Being able to take the time to get it right is a rare luxury."
  167. But this will hurt adoption

  168. Community

  169. "I would be wholly concerned if any of Swift's goals

    were being defined by winning the short-term favor of business people."
  170. "I would be wholly concerned if any of Swift's goals

    were being defined by winning the short-term favor of business people."
  171. Swift 3

  172. API design guidelines Automatic application of naming guidelines to imported

    Objective-C APIs Adoption of naming guidelines in key APIs Swiftification of imported Objective-C APIs Focus and refine the language Improvements to tooling quality
  173. API design guidelines Automatic application of naming guidelines to imported

    Objective-C APIs Adoption of naming guidelines in key APIs Swiftification of imported Objective-C APIs Focus and refine the language Improvements to tooling quality
  174. API design guidelines Automatic application of naming guidelines to imported

    Objective-C APIs Adoption of naming guidelines in key APIs Swiftification of imported Objective-C APIs Focus and refine the language Improvements to tooling quality
  175. API design guidelines Automatic application of naming guidelines to imported

    Objective-C APIs Adoption of naming guidelines in key APIs Swiftification of imported Objective-C APIs Focus and refine the language Improvements to tooling quality
  176. API design guidelines Automatic application of naming guidelines to imported

    Objective-C APIs Adoption of naming guidelines in key APIs Swiftification of imported Objective-C APIs Focus and refine the language Improvements to tooling quality
  177. API design guidelines Automatic application of naming guidelines to imported

    Objective-C APIs Adoption of naming guidelines in key APIs Swiftification of imported Objective-C APIs Focus and refine the language Improvements to tooling quality
  178. None
  179. None
  180. API design guidelines Focus and refine the language Adoption of

    naming guidelines in Automatic application of naming imported Objective-C APIs Swiftification of imported Objectiv Improvements to tooling quality API design guidelines Focus and refine the language Type system cleanup and documentation Resilience Portability Complete generics Stable ABI
  181. API design guidelines Focus and refine the language Adoption of

    naming guidelines in Automatic application of naming imported Objective-C APIs Swiftification of imported Objectiv Improvements to tooling quality API design guidelines Focus and refine the language Type system cleanup and documentation Resilience Portability Complete generics Stable ABI
  182. API design guidelines Focus and refine the language Adoption of

    naming guidelines in Automatic application of naming imported Objective-C APIs Swiftification of imported Objectiv Improvements to tooling quality API design guidelines Focus and refine the language Type system cleanup and documentation Resilience Portability Complete generics Stable ABI
  183. API design guidelines Focus and refine the language Adoption of

    naming guidelines in Automatic application of naming imported Objective-C APIs Swiftification of imported Objectiv Improvements to tooling quality API design guidelines Focus and refine the language Type system cleanup and documentation Resilience Portability Complete generics Stable ABI
  184. "the generics and ABI stability goals will […] be the

    *highest* priority features"
  185. BS

  186. 0 SE

  187. We are here

  188. Swift 3

  189. ABI Stability

  190. None
  191. Long now

  192. Open Source

  193. Them

  194. Them

  195. Us

  196. Community

  197. Together

  198. A Time Lapse View of Swift UIKonf 2016 Daniel H

    Steinberg @dimsumthinking