> On Jul 18, 2017, at 11:36 AM, Taylor Swift <kelvin1...@gmail.com> wrote:
>
> > fix the ordering of the arguments in
> > initializeMemory<Element>(as:at:count:to:)
>
> I think this ordering was an attempt to avoid confusion with binding
> memory where `to` refers to a type. However, it should be consistent
> with `UnsafePointer.initialize`, so we need to pick one of those to
> change.
>
> This would be a non-issue had we just been consistent with the rest of the
> stdlib and named this argument `repeating:` instead of `to:`. But
> `ptr.initialize(repeating: 255, count: 100)` doesn’t read quite as naturally
> in English as `ptr.initialize(to: 255, count: 100)` which is why I left this
> idea out of the proposal. Now that you mention the problem with
> `initializeMemory<Element>(as:at:count:to:)`, it might be a good idea to add
> this rename back into it.
I think `repeating` is much more clear.
-Andy
_______________________________________________
swift-evolution mailing list
swift-evolution@swift.org
https://lists.swift.org/mailman/listinfo/swift-evolution