[swift-evolution] String Comparison

Dave Abrahams dabrahams at apple.com
Tue Jan 24 11:44:58 CST 2017

on Tue Jan 24 2017, Xiaodi Wu <xiaodi.wu-AT-gmail.com> wrote:

> I agree that there are refinements to operators that are needed, such as
> the ability to pick which ones to import and more flexibility in shadowing
> them, etc. But I think that's a whole nother discussion, and I rather think
> that string comparison is a distinctly poor use case for it. An operator is
> really tailored to do one unambiguous operation with two arguments. Here,
> there's more than one operation when it comes to string comparison and
> therefore multiple arguments. Why try to fit a square peg into a round
> hole? It's already possible to do what you suggest with ordinary function
> names, so what's different here seems to come down to new syntax that IMO
> should be designed separately in the context of operators, not really
> something to do with strings.



More information about the swift-evolution mailing list