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

Vanderlei Martinelli vmartinelli at alecrim.com
Fri Feb 12 00:01:46 CST 2016


Strong -1 for removing or change `==`.

I warned about something like this when talking about remotion of `++` and
`--` before.

It seems that the whole concern is going toward preventing all the ways
that a developer, well ... Develop.

We are not talking about the future of the Pages app, but now imagine that
it prevents you from writing the text the way you want, because it is safer
or modern and this is "better for you".

Maybe I'm wrong understanding, but the future of the Swift language
involves it be used by programmers, is not it? I imagine that programmers
know what `==` and `=` are and do not confuse them with each other or
something else.

Good programmers make a good language, but there is no good language in the
world that can make someone become a good programmer if he/she is not.


-Van


On Fri, Feb 12, 2016 at 12:12 AM, Myles La Verne Schultz via
swift-evolution <swift-evolution at swift.org> wrote:

> Agreed, -1, ‘==‘ is a very common idiom in Swift.
>
> On Feb 11, 2016, at 8:54 PM, Allen Ding via swift-evolution <
> swift-evolution at swift.org> wrote:
>
> -1 from me.
>
> This is a fundamental change to an operator that is one of the most
> frequently used in the language. IMO, any alternative has to offer the same
> ease of use in addition to any theorized benefits.
>
> FWIW, I understand the potential for confusion and accidental typos, but
> with warnings from tooling (including in various other languages), I can't
> recall an instance of having made this particular in the past few years, so
> it isn't that big of a deal to me.
>
> - Allen
>
>
> On Fri, Feb 12, 2016 at 7:32 AM, Amir Michail via swift-evolution <
> swift-evolution at swift.org> wrote:
>
>> It’s too easy to accidentally write “x==2” instead of “x=2”.
>>
>> I don’t think something like “x==2” should be a valid statement.
>> _______________________________________________
>> swift-evolution mailing list
>> swift-evolution at swift.org
>> https://lists.swift.org/mailman/listinfo/swift-evolution
>>
>
> _______________________________________________
> swift-evolution mailing list
> swift-evolution at swift.org
> https://lists.swift.org/mailman/listinfo/swift-evolution
>
>
>
> _______________________________________________
> swift-evolution mailing list
> swift-evolution at swift.org
> https://lists.swift.org/mailman/listinfo/swift-evolution
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160212/dbc34c0e/attachment.html>


More information about the swift-evolution mailing list