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

Dave Abrahams dabrahams at apple.com
Tue Jul 5 09:20:52 CDT 2016


The use "as"?

Sent from my moss-covered three-handled family gradunza

> On Jul 5, 2016, at 6:48 AM, Andrew Trick <atrick at apple.com> wrote:
> 
> 
>>> 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/45e7bf68/attachment.html>


More information about the swift-evolution mailing list