[swift-evolution] Proposal: x == 2 should not be a valid statement
Radosław Pietruszewski
radexpl at gmail.com
Thu Feb 11 17:54:28 CST 2016
I definitely don’t like the idea of = meaning two very different things, whether or not it’s unambiguous to the compiler.
Why break decades-long programming convention for this?
— Radek
> On 12 Feb 2016, at 00:50, Jessy Catterwaul via swift-evolution <swift-evolution at swift.org> wrote:
>
>
>> What do you propose as an alternative operator for testing equivalence?
>
> =
>
> http://catterwaul.com/equality-operator/
>
> Jonathan Tang’s brings this up:
> {x == 2}
>
> You’d need to use the return keyword. Oh well; I think it reads better.
> {return x = 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