[swift-evolution] Redundant parentheses should result in compile errors.
Adrian Kashivskyy
adrian.kashivskyy at me.com
Sat Dec 5 12:40:24 CST 2015
> 2 + 3 % 4 * 5 is not at all readable for me without parentheses.
Agree, it's neither readable, nor predictable, because of the operator precedence. That's why I don't understand why should one omit parentheses in such cases. I'm -1 on this for now.
Pozdrawiam – Regards,
Adrian Kashivskyy
> Wiadomość napisana przez Nicky Gerritsen <nickygerritsen at me.com> w dniu 05.12.2015, o godz. 19:36:
>
>
>> On 5 dec. 2015, at 19:33, Amir Michail <a.michail at me.com> wrote:
>>
>> This isn’t just a style issue.
>>
>> Rather, it would force programmers to remember operator precedence better thus resulting in fewer bugs.
> But is this not also often used to make “bigger” expressions / conditions more readable?
> I think already the example from https://developer.apple.com/library/prerelease/ios/documentation/Swift/Conceptual/Swift_Programming_Language/AdvancedOperators.html#//apple_ref/doc/uid/TP40014097-CH27-ID41 is a good example
> 2 + 3 % 4 * 5 is not at all readable for me without parentheses.
>
> -- Nicky
> _______________________________________________
> 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/20151205/36d7936b/attachment.html>
More information about the swift-evolution
mailing list