Tuesday, August 22, 2017 [Tweets] [Favorites]

Swift 4: Synthesizing Equatable and Hashable Conformance


Developers have to write large amounts of boilerplate code to support equatability and hashability of complex types. This proposal offers a way for the compiler to automatically synthesize conformance to Equatable and Hashable to reduce this boilerplate, in a subset of scenarios where generating the correct implementation is known to be possible.



Maybe next they can get rid of "func" and "var", and change "let" to const. And switch the order of the type definitions (its backwards). Then Swift will be an ok language to write in. Still not as good as Objective-C of course, but that's a good start.

[…] Swift’s Error Handling Implementation, Swift 4: Bridging Peephole for “as” Casts, Swift 4: Synthesizing Equatable and Hashable Conformance, Swift 4: JSON With Encoder and Encodable, Swift 4 String Manifesto, Provide Custom Collections for […]

Stay up-to-date by subscribing to the Comments RSS Feed for this post.

Leave a Comment