<https://github.com/apple/swift-evolution/blob/master/proposals/ 0088-libdispatch-for-swift3.md>
## Type Names I was going to suggest unprefixed type names, but having to qualify both `Dispatch.Data` and `Foundation.Data` would be an issue. If libdispatch had originally been part of Foundation, you'd need prefixes anyway: * DispatchQueue * NotificationQueue * OperationQueue ## Quality of Service Should argument labels and type names match those in Foundation? * qos: => qualityOfService: * DispatchQoS => DispatchQualityOfService Could there be a shared `Swift.QualityOfService` enum? * QOS_CLASS_DEFAULT = 0x15 * NSQualityOfServiceDefault = -1 The `.unspecified` QoS is not defined in NSQualityOfService. Would an optional QoS parameter (defaulting to nil) be better? ## Time The `dispatch_time` function uses a nanoseconds delta, so the operator overloads taking `seconds: Double` might be ambiguous at the call site. You could try changing the associated value types of your enum. ``` enum DispatchTimeInterval { case seconds(Double) // changed from `Int` case milliseconds(Int64) // changed from `Int` case microseconds(Int64) // changed from `Int` case nanoseconds(Int64) // changed from `Int` } let _ = DispatchTime.now + 3.5 // ambiguous? let a = DispatchTime.now + .seconds(3.5) let b = DispatchTime.now + .milliseconds(3_500) let c = DispatchTime.now + .microseconds(3_500_000) let d = DispatchTime.now + .nanoseconds(3_500_000_000) ``` Is the `DispatchTime.now` in your example a type property? ## Data Should the `DispatchData.append` methods have `contentsOf:` labels? Or could it conform to the RangeReplaceableCollection protocol? ## Queues My suggestions for the async/sync methods: * enqueue(...) * enqueueAndWaitUntilFinished(...) -- Ben _______________________________________________ swift-evolution mailing list swift-evolution@swift.org https://lists.swift.org/mailman/listinfo/swift-evolution