Tag

Hashable

1 views collected around this technical thread.

Liulishuo Tech Team
Liulishuo Tech Team
Apr 13, 2018 · Fundamentals

Understanding Compiler Synthesis of Equatable and Hashable in Swift 4.1

This article explains how Swift 4.1's compiler can automatically synthesize Equatable and Hashable implementations, the necessary conditions, examples of enums and structs, the limitations of synthesis, and how developers can override or supplement the generated code for better performance and correctness.

EquatableHashableProgramming
0 likes · 8 min read
Understanding Compiler Synthesis of Equatable and Hashable in Swift 4.1