[swift-evolution] Take 2: Stdlib closure argument labels and parameter names

Dave Abrahams dabrahams at apple.com
Wed Jun 29 13:12:41 CDT 2016


on Wed Jun 29 2016, Matthew Johnson <matthew-AT-anandabits.com> wrote:

> A suggestion for the future enhancements - rename elementsEqual to
> elementsEquivalent.  If we make that change the shorter 'by' label
> would feel much less awkward to me in this method.

Well, 

  x.elementsEquivalent(y, by: areSameExceptForCase)

is more ungrammatical than 

  x.elementsEqual(y, by: areSameExceptForCase)

and breaks the connection with 

  x.elementsEqual(y) 

somewhat.

Maybe changing the closure parameter name to “areEqual” would be a
better choice.

-- 
Dave


More information about the swift-evolution mailing list