[Pitch] Restrict pointer conversion to C interoperability

This does not disable the feature! It restricts it to C/C++ and Swift wrappers of C/C++ API, which are the entire reason pointer conversions exist in the first place. Relying on pointer conversion in pure Swift API is simply unsafe, and there is no way to fail safely (such as trapping), since bounds information is not preserved. We are also working on addressing memory sharing ergonomics in pure Swift, as laid out in this roadmap.

4 Likes