ietf-mta-filters
[Top] [All Lists]

Re: Working Group Last Call on draft-ietf-sieve-variables-00.txt

2005-02-17 16:44:27

[sorry, I'm slow]

On Mon, Feb 07, 2005 at 12:41:26AM +0100, Kjetil Torgrim Homme wrote:
On Sat, 2005-02-05 at 17:01 -0500, Mark E. Mallett wrote:

Hmm, I glossed over this before.  There are other environments
(including typical regex implementations) where it's common to have
submatch 0 represent the entire matched string.  Access to the number of
strings is useful, but so is access to the entire match (probably more
so than the number of matches, since that's predictable from the pattern
used).  Since it's nice to be consistent with what people might already
be used to, I'd recommend having index 0 be the entire match, and something
else be the count of the matches.  Maybe a special ${#} for the number
of matches.

I think too little is gained by this change to incorporate it at this
stage.

My prediction is that something returning the entire match string will
be much more useful than something returning the count of matches.
I'd rather have both, though, and providing them is really a minor thing,
no matter how late it is.



Or keep ${0} as the count, and add something else (e.g. ${*}) as the
complete match string.

explicit is better than implicit -- users can just add an extra pair of
parentheses.  (this only applies to :regex.  for :matches, the match
string is always equal to the source string.)

Indeed it is- it's still useful to be able to access it.



4.  Action set

   > An illegal name MUST cause a syntax error.

"MUST be detected as a syntax error" ?  (at compile time?  runtime?)

from RFC 3028, 2.10.6:

   In any programming language, there are compile-time and run-time
   errors.

   Compile-time errors are ones in syntax that are detectable if a
   syntax check is done.

so compile-time.

Just to be clear, my main comment was about the wording "must cause a
syntax error" being wrong.  The parenthesised "compile time or runtime"
was a side comment and yeah, it's probably obvious that it's compile
time.

-mm-