<commit_before># Introduce `withUnsafe{Mutable}BufferPointerIfSupported` methods

* Proposal: [SE-0237](0237-contiguous-collection.md)
* Author: [<NAME>](https://github.com/airspeedswift)
* Review Manager: [Doug Gregor](https://github.com/DougGregor)
* Status: **Active review (November 29...December 3, 2018)**
* Implementation: [apple/swift#20484](https://github.com/apple/swift/pull/20484)
* Prior revisions: [Version 1](https://github.com/apple/swift-evolution/commit/be787dee0732895d35e0aba8f2f69d1f310b4e99)

## Introduction

This proposal introduces two new methods, on `Sequence` and
`MutableCollection`. These methods will allow generic code on to make use of
the thos respective protocols to make use of
`withUnsafe{Mutable}BufferPointerIfAvailable` idiom in provide fast paths in
the standard library for adopting types.

Swift-evolution thread: [Contiguous Collection Protocols](https://forums.swift.org/t/contiguous-collection-protocols/17875)

## Motivation

Almost every feature of `Array` is made available via one of the protocols
in the standard library, and so most code written against `Array` can be
rewritten generically as an extension of one or more protocols.

The exceptions to this are the operations `withUnsafeBufferPointer` and<commit_msg>Update 0237-contiguous-collection.md (#964)<commit_after># Introduce `withUnsafe{Mutable}BufferPointerIfSupported` methods

* Proposal: [SE-0237](0237-contiguous-collection.md)
* Author: [<NAME>](https://github.com/airspeedswift)
* Review Manager: [Doug Gregor](https://github.com/DougGregor)
* Status: **Active review (November 29...December 3, 2018)**
* Implementation: [apple/swift#20484](https://github.com/apple/swift/pull/20484)
* Prior revisions: [Version 1](https://github.com/apple/swift-evolution/commit/be787dee0732895d35e0aba8f2f69d1f310b4e99)

## Introduction

This proposal introduces two new methods, on `Sequence` and
`MutableCollection`. These methods will allow generic code to make use of the `withUnsafe{Mutable}BufferPointer` idiom, as well as provide fast paths in the standard library for adopting types.

Swift-evolution thread: [Contiguous Collection Protocols](https://forums.swift.org/t/contiguous-collection-protocols/17875)

## Motivation

Almost every feature of `Array` is made available via one of the protocols
in the standard library, and so most code written against `Array` can be
rewritten generically as an extension of one or more protocols.

The exceptions to this are the operations `withUnsafeBufferPointer` and
{'fraction_non_alphanumeric': 0.10111022997620936, 'fraction_numerical': 0.04639175257731959, 'mean_word_length': 6.127118644067797, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 10, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6705658', 'n_tokens_mistral': 850, 'n_tokens_neox': 718, 'n_words': 233}