[swift-evolution] Redundant parentheses should result in compile errors.

Nicky Gerritsen nickygerritsen at me.com
Sat Dec 5 12:36:47 CST 2015


> 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


More information about the swift-evolution mailing list