Hi everyone. The review of SE-0557, Add RawSpan primitive to Hasher, ran from October 12 through October 20, 2026, and the Language Steering Group has decided to accept this proposal. It is a straightforward adaptation of the existing Hasher.combine(bytes: UnsafeRawBufferPointer) API to also work with the safe RawSpan type.
Reviewers raised a couple of points of feedback, which the Language Steering Group does not believe require changes to the proposal as written:
Unsafety of accessors producing RawSpans
Reviewers raised concerns about the existence of the Span.bytes accessor, which can currently produce a RawSpan over the bytes of any BitwiseCopyable type, even if the type contains padding bytes that would be undefined behavior to read, which could make the Hasher.combine(bytes:) API an easy footgun for developers who carelessly invoke Hasher.combine(bytes: self.span.bytes) as their hashing implementation. However, the author of the proposal noted that the Span.bytes API is already being reexamined to consider whether it should be made unsafe, with stronger constraints imposed on the safe variant. Aside from padding, there are also many other reasons that feeding the raw bytes of a value into a hasher may not be an appropriate Hashable implementation for a type, so some developer discretion is already necessary in using this API correctly.
Naming
There was some discussion about whether it would be more in the spirit of the naming guidelines to call this API combineBytes(_:) instead of combine(bytes:). The existing related APIs on Hasher already use combine(bytes:), and the Language Steering Group does not see a strong reason for this new API to diverge with existing practice.
Thank you to everyone who provided feedback during the review!