
VP: Also, when calling a function with two arguments, you were able to pass a tuple of two arguments, and that would work. They removed that in Swift Evolution as well. This shows how people behind the language sometimes go back on their choices.ĭS: There was also this feature at the very beginning of Swift that enabled you to write your functions as curried functions, and you could call a few at a time. When saw this edge case, they removed the feature from the language. For example, if you had an array of people, with some owning pets, and you asked for the people with pets who are less than 8 years old, people with no pets would show in the result, because nil was less than everything. At the time, this function seemed like a great idea, but it was leading to some very weird situations. For instance, in one of the proposals, they removed the feature that allowed us to compare optionals. VP: An evolution proposal could actually be about removing something. And with the new rules of Swift Evolution, it may time out. So now you have this function that seems to be a very obvious solution but it’s been left to languish. After it was implemented, Ben found a corner case that impacted performance. The function count(where:), which was part of proposal 220, is a good example. I think it’s a really great way to learn and to go beyond the Swift documentation.ĭaniel Steinberg: And things that you think might are obvious are sometimes not. In addition to finding lots of very interesting information and edge cases relating to the latest features, you will also get a glimpse of the mindset of the people who made the proposals as well as the alternatives they have explored. They are on GitHub, so they are all accessible. Vincent Pradeilles: Something I really recommend to people who want to get some in-depth knowledge about the latest evolutions happening in Swift is checking Swift Evolution proposals. If you’d like to listen to our future AMAs live, join the Welcome Tech club on Clubhouse! On the importance of reading Swift Evolution proposals In this article, you will find the main topics Steinberg and Pradeilles discussed during the session.

He currently presents iPhone, Cocoa, and Swift training and consults through his company, Dim Sum Thinking.
#STEINBERG VSTACK MAC#
Steinberg is the author of several programming books, including A SwiftUI Kickstart and A Swift Kickstart, and has written apps for the iPhone and iPad since the SDKs first appeared, as well as Mac programs that date all the way back to System 7. Daniel Steinberg was our guest for an Ask Me Anything session (AMA) held on April 13, 2021, hosted by the iOS expert Vincent Pradeilles, and dedicated to the evolutions that have been happening in the Swift language in the two years since Swift 5 was released.
