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

Re: NULL vs. ""

2005-05-31 07:32:44

On Tue, May 31, 2005 at 03:57:21PM +0200, Kjetil Torgrim Homme wrote:
On Tue, 2005-05-31 at 07:21 -0400, Mark E. Mallett wrote:
I think a NULL test of some sort could be useful with variables,
but that's another road that's already been paved...

not sure what that expression means, but the document hasn't been
approved yet, so changes can still happen.

Nothing sinister..  just an acknowledgement that people would like to
get on with finalizing that draft and not enter into new tangents in it.


the test introduced with variables is "string", so there is no way to
access the value of a variable except inside a string.  likewise for
setting a variable, you (currently) have to provide a string.  having
"${unset_variable}" extrapolate to a special value rather than a string
is IMO ugly and counter-intuitive.

Probably so.  There could conceivably be different kinds of syntaxes to
do different kinds of expansions, though; I think that notion has been
raised before.  e.g. one could borrow from 'sh' syntax, which has:

    ${var:alt}

where the text "alt" is used if 'var' does not exist as a variable.
Or some other kind of expansion controls, e.g. other tagged options
in "set" (along the lines of :length).  



to support NULL values with variables, I see two alternatives:

        a) a new test which takes a variable _name_ as its argument.  we
        also need a NULL token which can be used with that test and with
        SET.
        
        b) a new test to check explicitly for unset values.  a new
        action UNSET which can only set variables to the NULL value.

I don't really like a NULL/UNSET token, it opens to many issues.  I
wouldn't mind adding alternative b) to the spec, though, it may be
useful in some cases.

Seems rational to me, but then again there's that thing about delaying
the draft with more reviews.

mm


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