[Top] [All Lists]

Re: Sieve Readability Suggestions

1997-04-25 12:41:22
On Fri, 25 Apr 1997, Chris Newman wrote:

(1) Comments

I suggest using "--" instead of "#" as the comment introducer.  "--" is
what Applescript uses, and is more likely to make sense to the average
human (rather than a programmer) IMHO.

I can see this, but I'd like a second opinion.  It seems a little strange to

(2) The "header" test

I'd like it if the <header-name-list> and the <key-list> items could be
either a list or a single quoted string.  Thus you would get:

if header "Subject" contains "$$" then

This is probably a good idea.

(3) The "header" -nocase arguments

I think nocase should be the default with -case as the modifier.  So you'd
get "contains", "is", "matches", "contains-case", "is-case",
"matches-case".  This makes it more readable, IMHO, and makes the
more common case easier to type.

Ok, this makes sense.
(4) Trailing ";"

The grammar seems to require a trailing ";" after every command
(including an endif).  I'm starting to think it would be better to simply
have CRLF terminate a command as many of your examples do (and use "\"
CRLF to fold a line).

I'll fix the examples to reflect what's in the draft.  I'm not sure I like
this change, but it might clean things up.  I'd like a second opinion.

I would drop ; from the grammar entirely if this is the case, i.e., no more
than one command on a line.

(5) Optional ","

I'm uncomfortable with "," being optional in any-of and all-of lists.  I
think it should either be required or unnecessary.

It should be required; I'll make sure the next draft reflects this.

(6) Normal action

How about calling this "keep"?

Fine with me.

(7) Message introducer

You currently use "message" to introduce a block of text.  I'll point out
that this isn't really a message, as it's lacking headers.  I suggest
using "text:" instead of "message".

Ok, this is an improvement.

                                           Tim Showalter