TIL UnsafeBufferPointer.extracting(_:) method and proposed modify and read accessors
TIL about UnsafeBufferPointer.extracting(_:)
, a method for creating a buffer pointer over items in an already existing buffer pointer. This was new to me—I previously used ranges to construct such buffers.
Also explored Swift accessor evolution proposals:
- Read the [Pitch] Modify and read accessors discussion on Swift forums
- Reviewed the Modify and read accessors Swift Evolution proposal (awaiting review at time of writing)
- Studied the Yielding accessors Swift Evolution proposal (in active review April 8-22, 2025)