> On Sep 5, 2017, at 6:28 PM, Taylor Swift <[email protected]> wrote:
>
>>
>> UMRP (raw pointer):
>> --- func initializeMemory<T>(as:at:(=0)count:(1)to:)
>> +++ func initializeMemory<T>(as:repeating:count:) // remove default count
>>
>> still extremely suspicious of this but i’m willing to compromise. also there
>> should be an `initializeMemory<T>(at:to:)` to match the typed methods
>>
>> Do you mean initializeMemory<T>(as:to:)?
>
> I don’t think it’s necessary since raw buffers are not normally used to hold
> a single typed element. We don’t need symmetry between raw and typed pointers
> and I wouldn’t want to add an API that will never be used. So, I would be ok
> with it only if there’s some use case that I’m overlooking.
>
> The only case i can think of is initializing a buffer header but then again i
> rarely use raw pointers so i’m not sure how much this feature would be used.
> However, this function is already
> <https://developer.apple.com/documentation/swift/unsafemutablerawpointer/2427589-initializememory>
> in the API (with a default count of 1 and offset of 0) so there’s that.
Yeah, but you’re deprecating the old API entry point anyway. The `at` argument
was never used AFAICT. I doubt code is using the default `count` and it seems
like a fixit could handle it.
-Andy
_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution