[swift-evolution] [Review] SE-0107: UnsafeRawPointer API (initialize:with:)

Andrew Trick atrick at apple.com
Tue Jul 5 08:48:30 CDT 2016


> On Jul 4, 2016, at 6:19 PM, Dave Abrahams via swift-evolution <swift-evolution at swift.org> wrote:
> 
>> So Swift 3 users have already migrated to this “better” name.
>> 
>> I agree that initialize(to:) is consistent with the language we use
>> for assigning values. But grammatically, I think initialize(with:)
>> also makes perfect sense and is just as common.
> 
> “With” is a weak preposition with many possible interpretations, so we'd
> like to avoid it.  If I used “with” where “to” would have worked, I
> regret it.

That looks like a +1 from DaveA.

So, my only objection is that I’m trying to establish a convention where “from:” reads from memory at a pointer and “to:” writes to memory at a pointer. Here “to” is backward because the object of the preposition is not being modified.

-Andy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160705/b4f89175/attachment.html>


More information about the swift-evolution mailing list