---
title: "isTriviallyIdentical(to:)"
framework: swift
role: symbol
role_heading: Instance Method
path: "swift/dictionary/istriviallyidentical(to:)"
---

# isTriviallyIdentical(to:)

Returns a boolean value indicating whether this dictionary is identical to other.

## Declaration

```swift
func isTriviallyIdentical(to other: Dictionary<Key, Value>) -> Bool
```

## Discussion

Discussion Two dictionary values are identical if there is no way to distinguish between them. For any values a, b, and c: a.isTriviallyIdentical(to: a) is always true. (Reflexivity) a.isTriviallyIdentical(to: b) implies b.isTriviallyIdentical(to: a). (Symmetry) If a.isTriviallyIdentical(to: b) and b.isTriviallyIdentical(to: c) are both true, then a.isTriviallyIdentical(to: c) is also true. (Transitivity) If a and b are Equatable, then a.isTriviallyIdentical(b) implies a == b. a == b does not imply a.isTriviallyIdentical(b) Values produced by copying the same value, with no intervening mutations, will compare identical: let d = c print(c.isTriviallyIdentical(to: d)) // Prints true Comparing dictionaries this way includes comparing (normally) hidden implementation details such as the memory location of any underlying dictionary storage object. Therefore, identical dictionaries are guaranteed to compare equal with ==, but not all equal dictionaries are considered identical. note: O(1)
