[swift-evolution] Proposal: x == 2 should not be a valid statement

David Waite david at alkaline-solutions.com
Fri Feb 12 00:15:12 CST 2016


Won’t that conflict with the existing use of “is” as a keyword for type tests?

You know, if we proposed changing ‘ == ‘ to ‘ = ‘ and ‘ = ‘ to ‘ := ‘ it would break all existing code, plus *really* stir up the “Colon vs Equals” thread.

I’m of course  -1 on changing around equality, equivalence and assignment syntax without strong justification.

-DW

> On Feb 11, 2016, at 4:59 PM, Jessy Catterwaul via swift-evolution <swift-evolution at swift.org> wrote:
> 
>> So, == gets replaced with six characters, plus a special case of “=“?
>> 
>> -1 from me.  Don’t like this idea at all.
> 
> Fair enough. How about “is”?
> 
> {x is 2}
> _______________________________________________
> swift-evolution mailing list
> swift-evolution at swift.org
> https://lists.swift.org/mailman/listinfo/swift-evolution



More information about the swift-evolution mailing list