procmail
[Top] [All Lists]

RE: procmail regex style using Or construct

2009-02-22 02:54:45
Professional Software Engineering wrote Saturday, February 21, 2009 10:31
PM:

At 11:08 2009-02-21 -0800, Dallman Ross wrote:

I agree with Ruud.  Sean, don't let your personal stylistic
preferences become so prejudicial that they devolve into general
warnings.  There's nothing at all wrong with the syntax,

If you read my original posting, I clearly stated the reason for
my opinion on the matter - it wasn't a "general warning" - it was
specifically tailored to the multiple sequential rules necessary to
accomplish the OP's request, and that one regexp example which Ruud
presented was presented without the context of demonstrating how the
OTHER day ranges would need to be checked, and thus could easily be
misinterpreted by newbies and people trying to learn from what they
read on this list.

Somebody, perhaps not the OP, but somebody, would read that and think
that they could use [8-14] in the regexp, because the only context of
that syntax was given for the first week example, which happens to
fall nicely into a single character character-class regexp.

Perhaps my wording was too strong.  If so, I apologize.  But I did
read your original article, fwiw.  I'm traveling and didn't have time
to respond when I read it, but anyway, I didn't really think it was
all that big a deal -- I don't necessarily feel the need to respond
to every little thing even when I might have a slightly different
viewpoint about it.  But Ruud's comment came at a moment when I did
have time to respond, and since I am interested in the discussion,
well, I did.

I still don't think the idea that some theoretical newbie won't
understand character-class expressions is a persuasive reason to
avoid them, though.  Neither is "(a|b|c)" necessarily intuitive,
and if one leaves out the surround-parens, for example, it can
make thing fail to work right and confuse newbies as well.

have a stylistic preference for yourself and to state your reasons,
but don't call good syntax bad because of that.

Please re-read my original post, not the fragment quoted by Ruud.
Apparently, you've missed where I compared the syntaxes and stated the
reason for my comment - I *NEVER* claimed that Ruud's character class
syntax was in and of itself bad.

I didn't mean "bad," as in "won't work as intended."  I meant "bad,"
as in "don't do this, because it might confuse newbies."  But OK.

Dallman

____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>