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).
Indeed. If same($code1, $code2) could find out whether the $code1 and $code2 functions behave identically, then
would be a contradiction.sub f1 { "different"; } sub f2 { same(\&f1, \&f2) ? "same" : "different"; } f2();
In reply to Re^2: Equivalency of Code
by ambrus
in thread Equivalency of Code
by rkosai
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |