On 01/10/2010 02:12, bearophile wrote:
<snip>
Researchers at Stanford have just released a paper detailing their use of 
automated tools
to look for redundant code in 1.6 million lines of Linux. "Redundant" is 
defined as:
- Idempotent operations (like assigning a variable to itself)
<snip>

Idempotent operations are not necessarily redundant.

For example,

    x = y;

is idempotent, but not redundant. But performing the same idempotent operation multiple times in succession is an example of redundancy.

Really, section 2 of that paper isn't about idempotence at all.

For those who aren't sure what idempotent means, put simply it means that performing the operation multiple times in succession has the same effect as performing it only once.

But assigning a variable to itself is indeed redundant, because it has no effect.

Stewart.

Reply via email to