Method name elementsEqual
looks reasonable on Sequence
but gets outright misleading, when used on concrete types. The problem is lessened post Swift 4.1 by conditional conformances for Set
s of Equatable
elements that gives you ==
. But to me, the proposed five word method name represents the worst of excessively literal Cocoa naming, which doesn’t feel Swifty at all. sequentiallyEqual
proposed up-thread is much better. That name was even proposed in 4th reply to the original discussion thread. My search there hasn’t revealed any valid counter argument against that name other than preoccupation with lexicographicallyEqual
, which isn’t part of the updated proposal we vote on…
1 Like