Fresh Swift
  • About
  • Tags
Fresh Swift

#set


The power of sets in Swift

Swift provides three primary collection types - Array, Set, and Dictionary. When choosing one to work with, we often default to using Array. In this post, John Sundell shows us why we should consider using Set, providing examples of it’s advantages over the other types.

Posted on March 21, 2018

#set  #collection 

Sets & free functions

This post from editor’s cut looks at implementing a Set type as a free function. This is probably something different to how we normally think of types, and it’s an interesting idea.

Posted on February 12, 2018

#set  #function 

Dictionary and Set Improvements in Swift 4.0

Swift 4 added a lot of really awesome Dictionary and Set APIs. Operations like grouping, filtering, and transforming values are easier than ever, and can be performed in a single step. In this post on the official Swift blog, Nate Cook explores these new APIs. It’s also worth noting that most of the changes mentioned are available in Swift 3.2, so even if you have not yet moved to Swift 4, there is something here for you.

Posted on October 10, 2017

#swift 4  #dictionary  #set 

The power of switch statements in Swift

John Sundell looks at Swift switch statements, and demonstrates how versatile and powerful they can be, especially when combined with types defined using enums, tuples, and sets.

Posted on October 8, 2017

#switch  #enum  #set 

 •  2021  •  Fresh Swift

Hugo v0.81.0 powered  •  Theme by Beautiful Jekyll adapted to Beautiful Hugo