"When the operation is naturally described by a verb, use the verb’s imperative for the mutating method and apply the “ed” or “ing” suffix to name its nonmutating counterpart."
I known it. But, the "verb" here should be a action will change the object. Not every verb will change the object. Like the word: peek ,copy. In socket program, there's a action "peek", just check if there has new data in socket data buffer, not move out the data(like the API receive()). It's not "receiving". Daniel Duan <[email protected]>于2016年7月26日 周二11:39写道: > Please read the naming section in Swift API design guidelines > https://swift.org/documentation/api-design-guidelines/#naming > > > Daniel Duan > Sent from my iPhone > > On Jul 25, 2016, at 8:29 PM, Boris Wang via swift-evolution < > [email protected]> wrote: > > I am curious about the reason using "removing", > What we are doing is not remove, just selecting some elements from the > original collection. > > _______________________________________________ > > > 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
