[M3devel] [M3commit] CVS Update: cm3
Rodney M. Bates
rodney.m.bates at cox.net
Fri Aug 28 15:35:17 CEST 2009
Whenever I write/add code, in any language, I am in the habit of always
surrounding
every identifier with at least one blank, before and after. Otherwise,
grepping
for all occurrences of an identifier is a nightmare. You usually get
overwhelmed
with false hits where the identifier you want is a substring of others.
This is extremely common.
On the other hand, surrounding your search string with the Cartesian
product of all the characters that could conceivably surround identifiers
in code is a different kind of nightmare, and can fail to find important
hits. Combinations of grep piped to grep -v with wild cards, gets closer,
but that's a big pain too. (Hmm, maybe sometime I should try to script
that.)
Starting decades ago, I have wished every string-searching function had
some kind of metacharacter to mean "at beginning of identifier" and
"at end of identifier". It wouldn't be that hard, and the rules are so very
close to language-independent. But, AFAIK, it has never happened.
Not that adding the blanks in m3gdb mattered much, since my additions
and modifications to it are a tiny subset of what is there. And the
surrounding-with-blanks idea only works if you know for certain it has
been done everywhere.
Jay Krell wrote:
> CVSROOT: /usr/cvs
> Changes by: jkrell at birch. 09/08/28 04:55:49
>
> Modified files:
> cm3/m3-sys/m3gdb/gdb/gdb/: Tag: release_branch_cm3_5_8 m3-eval.c
> m3-exp.c m3-lang.c m3-threads.c
> m3-util.c m3-valprint.c
> cm3/m3-sys/m3gdb/gdb/gdb/save/: Tag: release_branch_cm3_5_8
> m3-lang.c m3-lang.h
> m3-valprint.c
>
> Log message:
> fix more pointless and inconsistent formating -- spaces before semicolons
>
>
>
More information about the M3devel
mailing list