Back to Basics: Hashable
Listen now
Description
πŸ”’ While the documentation for `Equatable` discusses the notions of "equivalence relation" _and_ "substitutability", there are conformances in the Standard Library that run afoul, but for pragmatic reasons. Let’s explore them and then dive deeper into a related protocol: `Hashable`.
More Episodes
πŸ”’ We've studied `Equatable` and `Hashable`, their laws, and saw how value types as simple bags of data easily conform via "structural" equality. What about reference types? Reference types are an amalgamation of data _and_ behavior, and that data can be mutated in place at any time, so how can...
Published 10/21/24
Published 10/21/24
πŸ”’ In this series we go back to basics with a deep dive into the subject of `Equatable` types. Equatability is a deceptively simple topic. It is a surprisingly tricky protocol that has some very specific semantics that must be upheld baked into it, and there are many misconceptions on how one can...
Published 10/07/24