Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^2: Equivalency of Code

by adamk (Chaplain)
on Feb 08, 2005 at 00:19 UTC ( #428870=note: print w/replies, xml ) Need Help??


in reply to Re: Equivalency of Code
in thread Equivalency of Code

You couldn't have picked a worse time to mention Perl::Compare really.

The normalization overhaul has taken something that did about 10-15 normalization "things" and now only has one (removal of insignificant things like whitespace/pod/comments).

The original (and still current to some degree) intent of PPI-style normalization is to check to see if changes to code "matter" or not.

For example this:
my $foo = 1; # comment
Is "equivalent" to this:
my $foo=1 ;
As the library of normalization functions grows back towards (and past) what the original and now abandoned Perl::Compare implementation had, it is only really intended to factor out changes like:
'foo' ---> "foo" "foo$bar" ---> "foo${bar}"; etc... etc...
One idea was to let other people edit "your" code, while being certain that they haven't actually changed anything.

I'm sure you can think of others.

In any case, the three above example may well be different, especially if they are object with overloaded operators.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://428870]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (3)
As of 2021-10-24 15:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My first memorable Perl project was:







    Results (89 votes). Check out past polls.

    Notices?