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

Andrew Trick atrick at apple.com
Tue Jul 5 10:05:34 CDT 2016


“as” is for types :)

Let’s say initialize(to:) is good and once we’ve bikeshedded all the other names we’ll see if there’s any potential for confusion…

Andy

> On Jul 5, 2016, at 9:20 AM, Dave Abrahams <dabrahams at apple.com> wrote:
> 
> 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 <mailto:atrick at apple.com>> wrote:
> 
>> 
>>> On Jul 4, 2016, at 6:19 PM, Dave Abrahams via swift-evolution <swift-evolution at swift.org <mailto: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/e147df58/attachment.html>


More information about the swift-evolution mailing list