> On Jun 21, 2016, at 1:24 AM, Adrian Zubarev via swift-evolution 
> <[email protected]> wrote:
> 
> Just yesterday I filed a bug because Data and DispatchData overlap but the 
> api is not consistent: https://bugs.swift.org/browse/SR–1843
> 
> I never used libdispatch in depth but wanted to learn how it works to evolve 
> my TCP module.
> 
> At first glance I spotted one wrong label name on DispatchIO:
> 
> public class func write(fromFileDescriptor: Int32, data: DispatchData, 
> runningHandlerOn queue: DispatchQueue, handler: (data: DispatchData?, error: 
> Int32) -> Swift.Void)
> 
> This should look like (because we write TO a file):
> 
> public class func write(toFileDescriptor: Int32, data: DispatchData, 
> runningHandlerOn queue: DispatchQueue, handler: (data: DispatchData?, error: 
> Int32) -> Swift.Void)

Please file a bug for this and I’ll get it fixed.

> 
> Interesting thing is also that this wasn’t proposed that way at all:
> 
> class func write(fileDescriptor: Int32, data: DispatchData, queue: 
> DispatchQueue, handler: (DispatchData?, Int32) -> Void)
> 
> 
> 
> 
> -- 
> Adrian Zubarev
> Sent with Airmail
> 
> Am 21. Juni 2016 um 08:40:55, Brent Royal-Gordon via swift-evolution 
> ([email protected]) schrieb:
> 
>> > The guideline that methods should "read as imperative verb phrases" 
>> > applies to the full name, labels and arguments and all, and not just the 
>> > base name. You'll recall that the original proposal had 
>> > .asynchronously(execute:), which is very much an imperative phrase. 
>> > `.async(execute:)` was substituted by popular demand, with "async" being 
>> > regarded as a term-of-art exception.
>> 
>> Right, I forgot about that. I had a vague feeling that `execute` was the 
>> verb, but the shortening obscured `async`'s role as an adverb.
>> 
>> -- 
>> Brent Royal-Gordon
>> Architechies
>> 
>> _______________________________________________
>> swift-evolution mailing list
>> [email protected]
>> https://lists.swift.org/mailman/listinfo/swift-evolution
> 
> _______________________________________________
> swift-evolution mailing list
> [email protected]
> https://lists.swift.org/mailman/listinfo/swift-evolution

_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to