[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnu-arch-users] Re: grokking arch

From: Charles Duffy
Subject: Re: [Gnu-arch-users] Re: grokking arch
Date: Thu, 25 Mar 2004 18:51:03 -0600

On Thu, 2004-03-25 at 18:32, Robert Anderson wrote:
> The number "73" for example, exists in no less than 85 of my
> UUID's in one my trees.

But doing a global search/replace on "73" would be silly.

When I write a regular expression to do a search and replace, I make
damn sure that it's not going to match stuff I don't intend it to match.
This means being aware of context and syntax, eyeballing the matches
with grep, etc. If it's for the work tree and I have reason to feel
extra paranoid, I use the fancy language-aware tools built into Eclipse
to only replace references to the specific variable/constant/whatever
than needs renaming.

If you're using the raw number 73 in your sources, unwrapped by a
descriptive variable name, in enough places that you'd do a global
search and replace on it, you've got bigger problems than needing to do
a "tla changes" and possibly fix some taglines before checkin. More
realistic things that one is likely to search and replace inside source
code generally don't fit into [a-f0-9-]{,4} and are much less likely to
generate such collisions.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]