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

Re: Variables : list : scope : system : const

2003-05-16 13:53:04

[Tony Hansen]:

  I really dislike using "_" for this purpose, because "_" in most
  languages is expected to be simply a word separator and nothing
  special. And I expect our users to treat it similarly, and not as
  anything that's part of any naming convention.

I believe you are right, although I'm not sure if it is a problem in
practice.

  What would be required for this to be possible? At the minimum,
  simply add "." or ":" to the list of valid characters allowed
  within a name. Treating "." or ":" as part of a naming convention
  is just that, a convention.

consider this minimal change to the draft:

        variable-ref    =       "${" variable-name "}"
-       variable-name   =       num-variable / identifier
+       variable-name   =       num-variable / *namespace identifier
+       namespace       =       identifier "."
        num-variable    =       1*DIGIT

since SET takes a pure identifier as its first argument, any variable
name with a namespace component effectively becomes read-only.

(I'm not sure we need nested namespaces, but I don't think they do any
harm.)

  (I've consistently used "." in my postings on this topic. Other
  than not using "_" for this purpose, I DON'T CARE which convention
  is chosen, be it ".", ":", "::", or whatever.)

since I grew up with Simula, I prefer "." as well :-)

  Now, I would also like it agreed upon that all sieve extensions
  that create variables SHOULD use a namespace using this naming
  convention. I would even recommend that a sieve extension named
  "example" SHOULD use "example." as the prefix on all of its
  variables. (I consider this a Best Practice issue.)

if we do this, I propose we change ${year} into ${date.year} etc.

-- 
Kjetil T.