in reply to Equivalency of Code
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).
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Equivalency of Code
by ambrus (Abbot) on Feb 07, 2005 at 10:26 UTC | |
by bunnyman (Hermit) on Feb 07, 2005 at 16:09 UTC | |
by dynamo (Chaplain) on Feb 07, 2005 at 22:29 UTC | |
by bunnyman (Hermit) on Feb 08, 2005 at 16:58 UTC | |
by adamk (Chaplain) on Feb 08, 2005 at 03:05 UTC | |
by dragonchild (Archbishop) on Feb 07, 2005 at 17:08 UTC | |
by Boots111 (Hermit) on Feb 08, 2005 at 03:48 UTC |
In Section
Seekers of Perl Wisdom