Re: I-D ACTION:draft-daboo-sieve-include-03.txt (fwd)

Kjetil Torgrim Homme <kjetilho@ifi.uio.no> Fri, 26 August 2005 11:09 UTC

Received: from above.proper.com (localhost.vpnc.org [127.0.0.1]) by above.proper.com (8.12.11/8.12.9) with ESMTP id j7QB9CvI038840; Fri, 26 Aug 2005 04:09:12 -0700 (PDT) (envelope-from owner-ietf-mta-filters@mail.imc.org)
Received: (from majordom@localhost) by above.proper.com (8.12.11/8.12.9/Submit) id j7QB9CIK038838; Fri, 26 Aug 2005 04:09:12 -0700 (PDT)
X-Authentication-Warning: above.proper.com: majordom set sender to owner-ietf-mta-filters@mail.imc.org using -f
Received: from pat.uio.no (IDENT:7411@pat.uio.no [129.240.130.16]) by above.proper.com (8.12.11/8.12.9) with ESMTP id j7QB9BUZ038804 for <ietf-mta-filters@imc.org>; Fri, 26 Aug 2005 04:09:11 -0700 (PDT) (envelope-from kjetilho@ifi.uio.no)
Received: from mail-mx3.uio.no ([129.240.10.44]) by pat.uio.no with esmtp (Exim 4.43) id 1E8c55-0000CC-08; Fri, 26 Aug 2005 13:09:07 +0200
Received: from 250.80-203-78.nextgentel.com ([80.203.78.250] helo=chico.njus.no) by mail-mx3.uio.no with esmtpsa (TLSv1:RC4-MD5:128) (Exim 4.43) id 1E8c4z-0004PH-04; Fri, 26 Aug 2005 13:09:01 +0200
Subject: Re: I-D ACTION:draft-daboo-sieve-include-03.txt (fwd)
From: Kjetil Torgrim Homme <kjetilho@ifi.uio.no>
To: Aaron Stone <aaron@serendipity.cx>
Cc: Sieve Mailing List <ietf-mta-filters@imc.org>
In-Reply-To: <twig.1125020754.94965@serendipity.palo-alto.ca.us>
References: <twig.1125014327.8763@serendipity.palo-alto.ca.us> , <twig.1125014327.8763@serendipity.palo-alto.ca.us> <twig.1125020754.94965@serendipity.palo-alto.ca.us>
Content-Type: text/plain
Date: Fri, 26 Aug 2005 13:08:54 +0200
Message-Id: <1125054534.15136.180.camel@chico.njus.no>
Mime-Version: 1.0
X-Mailer: Evolution 2.2.3 (2.2.3-2.fc4)
Content-Transfer-Encoding: 7bit
X-UiO-Spam-info: not spam, SpamAssassin (score=-3.701, required 12, autolearn=disabled, AWL 1.11, FORGED_RCVD_HELO 0.05, RCVD_IN_SORBS_DUL 0.14, UIO_MAIL_IS_INTERNAL -5.00)
Sender: owner-ietf-mta-filters@mail.imc.org
Precedence: bulk
List-Archive: <http://www.imc.org/ietf-mta-filters/mail-archive/>
List-ID: <ietf-mta-filters.imc.org>
List-Unsubscribe: <mailto:ietf-mta-filters-request@imc.org?body=unsubscribe>

On Fri, 2005-08-26 at 01:45 +0000, Aaron Stone wrote:
> On Thu, Aug 25, 2005, Kjetil Torgrim Homme <kjetilho@ifi.uio.no> said:
> 
> >                 require "variables";
> >                 set "var" "Hello Kitty";
> >                 if address :localpart "From" "tweety" {
> >                 	set :local "var" "Hello Birdie";
> >                 	set "var" "Tweety says hello";
> >                 }
> 
> Are you implying that we're adding both file scope and curly brace scope?

no.  if you don't specify :local, you are changing the global variable,
even if it is invisible.

okay, so you clearly didn't like these semantics.  since the
implementation must track which scope of the variable is active for
referencing, it might as well use that state to decide which scope to
modify during "set".

new suggested text:
-----
4.1. Scope modifier ":local"

        A variable value set with the modifier ":local" will shadow the
global value until
        the script returns.  This value is unchanged across "include"
statements.
        Subsequent "set" actions will modify the local value unless a
different scope
        modifier has been specified.

        In contrast with other modifiers for "set", this modifier does
not have any
        particular precedence and it does not change the resulting
value.
-----

with these semantics, ":global" wouldn't be a no-op, but what happens in
this example?

    set "var" "a";
    set :local "var" "b";
    set :global "var" "c";
    # what is ${var} here?
    set "var" "d";
    # and here?

I don't think we need ":global", and it would be confusing to use.
-- 
Kjetil T.