You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The API Design Guidelines mandate that factory methods begin with the prefix “make”.
Consider DispatchSource.read(fileDescriptor:queue:). Indeed, DispatchSource.read might mislead people to think that a read will be performed by this method. A clearer name would be DispatchSource.makeReadSource(fileDescriptor:queue:).
Additional Detail from JIRA
md5: 8436718ce74bfc22c5a82e791a10defc
Issue Description:
The API Design Guidelines mandate that factory methods begin with the prefix “make”.
Consider
DispatchSource.read(fileDescriptor:queue:)
. Indeed,DispatchSource.read
might mislead people to think that a read will be performed by this method. A clearer name would beDispatchSource.makeReadSource(fileDescriptor:queue:)
.Ditto for the other factory methods.
.machSend(port:eventMask:queue:)
.makeMachSendSource(port:eventMask:queue:)
.machReceive(port:queue:)
.makeMachReceiveSource(port:queue:)
.memoryPressure(eventMask:queue:)
.makeMemoryPressureSource(eventMask:queue:)
.process(identifier:eventMask:queue:)
.makeProcessSource(identifier:eventMask:queue:)
.read(fileDescriptor:queue:)
.makeReadSource(fileDescriptor:queue:)
.signal(signal:queue:)
.makeSignalSource(signal:queue:)
.timer(flags:queue:)
.makeTimerSource(flags:queue:)
.userDataAdd(queue:)
.makeUserDataAddSource(queue:)
.userDataOr(queue:)
.makeUserDataOrSource(queue:)
.fileSystemObject(fileDescriptor:eventMask:queue:)
.makeFileSystemObjectSource(fileDescriptor:eventMask:queue:)
.write(fileDescriptor:queue:)
.makeWriteSource(fileDescriptor:queue:)
The text was updated successfully, but these errors were encountered: