http://d.puremagic.com/issues/show_bug.cgi?id=8757
--- Comment #5 from [email protected] 2013-01-19 01:28:20 PST --- (In reply to comment #4) > I don't care if it solves half the bugs involving ternary operators that ever > happen. So you are saying that data in language design should be ignored? > You're suggesting that we force programmers to format their code in a > particular way, and I object to that. C language has some design mistakes, like in its precedence rules. A well designed language, and one of the design principles of D, has to help the programmer avoid the most common bugs. D fixes some of the mistakes of C design. This is a "formatting forced by D", that has saved me few times: void main() { int x, y; auto z = x & 1 == y; } temp.d(3): Error: 1 == y must be parenthesized when next to operator & See also issue 5409 for something similar. You don't want to many parentheses in expressions, but few strategically placed ones are a small price to pay to save you code from common mistakes. Your words don't hold water, unless you show that adding a ( ) there harms readability or some other real coding quality. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
