Skip to main content

Timeline for Check for balanced parentheses

Current License: CC BY-SA 3.0

7 events
when toggle format what by license comment
Apr 6, 2014 at 16:23 comment added rolfl At minimum, the 'opening' {{ of the code should be separated by newline, and correctly indented. The closing }} should be split as well. The inner {} are a code block, and should be on their own lines just like a method block or any other compound statement....
Apr 6, 2014 at 16:19 comment added senseiwu You seem to agree about immutability, I do not know whether any best practice recommendation exists for/against anonymous subclassing in such cases. In production code I had reviewed, I have also seen mostly the approach without anon. subclass which you seem to prefer. But lately I have seen the approach I proposed in use increasingly, especially by those who have coded in non Java languages. Code review in general involves some subjective opinion, sometimes matters of preference, style etc.
Apr 6, 2014 at 15:58 comment added rolfl The immutability is fine, but the anonymous subclass with instance initializer block with non-standard code formatting is what is confusing... which is what my first comment said. More verbose code or correctly formatted readable code.... call it what you want, but what you are recommending is not best practice in any common reference.
Apr 6, 2014 at 15:54 comment added senseiwu yeah..only if immutability is bad and more verbose code is less confusing in "real life".
Apr 6, 2014 at 13:55 comment added rolfl The instance initializer block you recommend leads to much confusion in real life, especially when you break the Java Code Style guidelines in the way that you have.
Apr 2, 2014 at 8:04 review First posts
Apr 2, 2014 at 8:17
Apr 2, 2014 at 7:47 history answered senseiwu CC BY-SA 3.0