Keep It Simple, Stupid | |
PerlMonks |
Re: Equivalency of Codeby Corion (Patriarch) |
on Feb 07, 2005 at 10:15 UTC ( [id://428611]=note: print w/replies, xml ) | Need Help?? |
As any C macro programmer will tell you, the three are not equivalent if you want to substitute any scalar expression for $x. The easy way of telling whether two pieces of code are identical is to force them into one canonical form, and then check if the two forms are identical. In the general case though, proving the functional identity of two pieces of code is equivalent to solving the halting problem, and thus infeasible (I think).
In Section
Seekers of Perl Wisdom
|
|