# Implement buffer pointer's \`MutableCollection\` methods as nonmutating

**URL:** <https://forums.swift.org/t/implement-buffer-pointers-mutablecollection-methods-as-nonmutating/24809>\
**Category:** Discussion\
**Created:** [May 24, 2019, 3:03am UTC](https://forums.swift.org/t/implement-buffer-pointers-mutablecollection-methods-as-nonmutating/24809 "2019-05-24T03:03:18Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![glessard](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/glessard/32/409_2.png) [@glessard](https://forums.swift.org/u/glessard)\
**Post date:** [May 24, 2019, 6:18am UTC](https://forums.swift.org/t/implement-buffer-pointers-mutablecollection-methods-as-nonmutating/24809/3 "2019-05-24T06:18:21Z")

</div>

I’m not sure this has been discussed as the main topic of a thread, but it was broached during the light discussion of SE-0237. I suggested giving the UnsafeBufferPointer types a nonmutating interface to MutableCollection, and that was turned down. In the core team’s first evaluation of the proposal, they cited a concern over having too many overloads. It does seem probable that such overloads might not pull their weight.

> [@Review of SE-0237: Introduce Contiguous Collection Protocols](https://forums.swift.org/t/review-of-se-0237-introduce-contiguous-collection-protocols/18069/8):
>
> Hello Swift Community, The review of [SE-0237 "Introduce Contiguous Collection Protocols"](https://github.com/apple/swift-evolution/blob/master/proposals/0237-contiguous-collection.md) ran from November 16...27, 2018. The Core Team is returning this proposal for revision, with a few comments: The Core Team felt that the use of inout for the closure parameter of withUnsafeMutableBufferPointer(IfSupported) was the best available option, and noted that the library could verify that the UnsafeMutableBufferPointer itself wasn't directly modified by checking for the expected base address / co…

---

_[View the full topic](https://forums.swift.org/t/implement-buffer-pointers-mutablecollection-methods-as-nonmutating/24809)._
