<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: Parentheses Inspections &#038; Intentions</title>
	<atom:link href="http://blogs.jetbrains.com/idea/2006/06/inspections-intentions/feed/" rel="self" type="application/rss+xml" />
	<link>http://blogs.jetbrains.com/idea/2006/06/inspections-intentions/</link>
	<description>tips &#38; tricks, news, how-to's</description>
	<pubDate>Wed, 16 May 2012 21:04:13 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.5</generator>
		<item>
		<title>By: BasLeijdekkers</title>
		<link>http://blogs.jetbrains.com/idea/2006/06/inspections-intentions/#comment-429</link>
		<dc:creator>BasLeijdekkers</dc:creator>
		<pubDate>Sat, 17 Jun 2006 10:37:22 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.jetbrains.com/idea/2006/06/inspections-intentions/#comment-429</guid>
		<description>Unary operators, like the not operator, are always evaluated before binary operators, on the same operands. This becomes quite obvious if you add some whitespace: 
boolean result = !b &#124;&#124; c;
If the intention surrounded single operands with parentheses every time in cases like these, it would get old pretty soon: 
boolean result = !(b) &#124;&#124; c;
I might have added one to let it parenthesize the operands of unary operators too, if it where possible for intentions to have options. But it isn't, so that makes this an example that highlights the importance of whitespace.
</description>
		<content:encoded><![CDATA[<p>Unary operators, like the not operator, are always evaluated before binary operators, on the same operands. This becomes quite obvious if you add some whitespace:<br />
boolean result = !b || c;<br />
If the intention surrounded single operands with parentheses every time in cases like these, it would get old pretty soon:<br />
boolean result = !(b) || c;<br />
I might have added one to let it parenthesize the operands of unary operators too, if it where possible for intentions to have options. But it isn&#8217;t, so that makes this an example that highlights the importance of whitespace.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: etienne</title>
		<link>http://blogs.jetbrains.com/idea/2006/06/inspections-intentions/#comment-428</link>
		<dc:creator>etienne</dc:creator>
		<pubDate>Sat, 17 Jun 2006 03:40:43 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.jetbrains.com/idea/2006/06/inspections-intentions/#comment-428</guid>
		<description>That sounds good! Thanks for the clarification.

One more case I could imagine is about negation:
boolean b=...;
boolean c=...;
boolean result  = !b&#124;&#124;c

</description>
		<content:encoded><![CDATA[<p>That sounds good! Thanks for the clarification.</p>
<p>One more case I could imagine is about negation:<br />
boolean b=&#8230;;<br />
boolean c=&#8230;;<br />
boolean result  = !b||c</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: BasLeijdekkers</title>
		<link>http://blogs.jetbrains.com/idea/2006/06/inspections-intentions/#comment-391</link>
		<dc:creator>BasLeijdekkers</dc:creator>
		<pubDate>Wed, 14 Jun 2006 09:13:15 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.jetbrains.com/idea/2006/06/inspections-intentions/#comment-391</guid>
		<description>&lt;p&gt;Indeed Etienne and Ahmed, the question of when parentheses are clarifying is open for debate. I had meant to elaborate on how the intention determines clarification, probably the most important information there is about the intention, but it slipped my mind:-) Here is how the intention does it:&lt;/p&gt;

&lt;p&gt;Parentheses are clarifying if they surround a binary expression, that expression is itself contained in a parent binary expression and the operator of the parent and child expression is not equal. There is one exception, parentheses surrounding an instanceof expression contained in a parent binary expression are also considered clarifying by the intention.&lt;/p&gt;

&lt;p&gt;Any improvements on this heuristic are welcome.&lt;/p&gt;</description>
		<content:encoded><![CDATA[<p>Indeed Etienne and Ahmed, the question of when parentheses are clarifying is open for debate. I had meant to elaborate on how the intention determines clarification, probably the most important information there is about the intention, but it slipped my mind:-) Here is how the intention does it:</p>
<p>Parentheses are clarifying if they surround a binary expression, that expression is itself contained in a parent binary expression and the operator of the parent and child expression is not equal. There is one exception, parentheses surrounding an instanceof expression contained in a parent binary expression are also considered clarifying by the intention.</p>
<p>Any improvements on this heuristic are welcome.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ahmed Mohombe</title>
		<link>http://blogs.jetbrains.com/idea/2006/06/inspections-intentions/#comment-379</link>
		<dc:creator>Ahmed Mohombe</dc:creator>
		<pubDate>Tue, 13 Jun 2006 12:59:23 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.jetbrains.com/idea/2006/06/inspections-intentions/#comment-379</guid>
		<description>Very good point Etiene :).
I don't think such a rule exists, nor do I think that one could define/implement it. IMHO the level of "clarification" is very subjective dependent on ones math knowledge/working experience(e.g. for longer expressions only a few parentheses are usefull). </description>
		<content:encoded><![CDATA[<p>Very good point Etiene :).<br />
I don&#8217;t think such a rule exists, nor do I think that one could define/implement it. IMHO the level of &#8220;clarification&#8221; is very subjective dependent on ones math knowledge/working experience(e.g. for longer expressions only a few parentheses are usefull).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: etienne</title>
		<link>http://blogs.jetbrains.com/idea/2006/06/inspections-intentions/#comment-374</link>
		<dc:creator>etienne</dc:creator>
		<pubDate>Tue, 13 Jun 2006 02:42:00 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.jetbrains.com/idea/2006/06/inspections-intentions/#comment-374</guid>
		<description>Very nice. The option to ignore clarifying parenthesis would be great. Though, the question is, which parentheses are clarifying and which ones are only redundant ;-)</description>
		<content:encoded><![CDATA[<p>Very nice. The option to ignore clarifying parenthesis would be great. Though, the question is, which parentheses are clarifying and which ones are only redundant <img src='http://blogs.jetbrains.com/idea/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: peter royal</title>
		<link>http://blogs.jetbrains.com/idea/2006/06/inspections-intentions/#comment-369</link>
		<dc:creator>peter royal</dc:creator>
		<pubDate>Mon, 12 Jun 2006 18:53:48 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.jetbrains.com/idea/2006/06/inspections-intentions/#comment-369</guid>
		<description>i agree. 'return (42)' is completely worthless, but your last example is useful.</description>
		<content:encoded><![CDATA[<p>i agree. &#8216;return (42)&#8217; is completely worthless, but your last example is useful.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

