# Combining hashes

**URL:** <https://forums.swift.org/t/combining-hashes/9082>\
**Category:** Discussion\
**Created:** [January 27, 2018, 3:46am UTC](https://forums.swift.org/t/combining-hashes/9082 "2018-01-27T03:46:37Z")\
**Posts on this page:** 1\
**Showing post:** 53

<div class="post-metadata">

**Author:** ![nnnnnnnn](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/nnnnnnnn/32/264_2.png) [@nnnnnnnn](https://forums.swift.org/u/nnnnnnnn)\
**Post date:** [January 30, 2018, 3:35pm UTC](https://forums.swift.org/t/combining-hashes/9082/53 "2018-01-30T15:35:10Z")

</div>

> [@lorentey](#):
>
> Slice is weird in that the straightforward way to calculate the hash by sequentially combining element hashes would not be correct for slices of unordered collections like Set and Dictionary.

🤔 I think slices of sets and dictionaries probably need to be order-dependent when we compare them. Those two types are "substitutable" for their primary use cases when equal, but definitely not for slicing operations.

---

_[View the full topic](https://forums.swift.org/t/combining-hashes/9082)._
