Andrew Bancroft 7/1/2015

Every Swift Value Type Should Be Equatable

Read Original

This article discusses the WWDC15 talk on building better apps with value types in Swift, focusing on the statement that every value type should be Equatable. It explains the reasoning behind this expectation, highlighting that values are inherently meant to be compared for equality. The article also covers how to implement the == operator and the three essential properties of equality: reflexivity, symmetry, and transitivity. It provides code examples and practical insights for Swift developers.

Every Swift Value Type Should Be Equatable

Comments

No comments yet

Be the first to share your thoughts!

Browser Extension

Get instant access to AllDevBlogs from your browser

Top of the Week

No top articles yet