develooper Front page | perl.perl5.porters | Postings from March 2000

RE: RE: A plea for more pollution

From:
Nick Ing-Simmons
Date:
March 20, 2000 04:57
Subject:
RE: RE: A plea for more pollution
Message ID:
200003201256.MAA19841@tiuk.ti.com
Paul Moore <Paul.Moore@uk.origin-it.com> writes:
>From: M.J.T. Guy [mailto:mjtg@cus.cam.ac.uk]
>> 
>> Good point.    I was proposing to look for both "PL_na" and "na" etc.
>> If a PL... symbol was found, we can assume the module has been updated
>> so no POLLUTE is needed.    I'd only force POLLUTE if there were
>> polluting symbols present and *no* PL... ones.
>
>But... In the case of na, a good fix for (silly example)
>
>    { na = 12; }
>
>is
>
>    { STRLEN na; na = 12; }
>
>instead of
>
>    { PL_na = 12; }
>
>because access to a local variable is faster than access to a global.
>
>So a fixed module may still refer to na rather than PL_na. 

Indeed for na that is what Tk does (mostly - in one or two places 
I changed the name as well).

>(I assume you
>don't propose to scan for declarations...?)
>
>I'm not sure of the value of the heuristic approach in any case, but I
>thought I'd add this datapoint...
>
>Paul.
-- 
Nick Ing-Simmons <nik@tiuk.ti.com>
Via, but not speaking for: Texas Instruments Ltd.




nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About