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

General thoughts on variables

2004-10-22 13:04:54

Hi-

I've been musing about the draft-homme-sieve-variables draft for
quite some time.  I've got two sorts of comments:

 1. About the approach taken to variables vs what I'd like to see;
 2. Specific comments about the draft.

#1 is kind of hard to get into, and seems contentious, so I've held off.

but #2 is hard to do without first having done #1, so here goes a
somewhat disorganized stab at the first.  Specific comments on the draft
will be in another message.

The bottom line is that if we're going to put variables into the
language, I'd like to see it done in a fundamental, fully integrated
way, while allowing for easy improvement and enhancement.  RFC3028 made
this statement:

   The language is not Turing-complete: it provides no way to write a
   loop or a function and variables are not provided.

Yet all of those things have been put on the table in one form or
another (and I doubt that anyone is really surprised that they'd come
up).  Once you've crossed the line to where you want something like
variables, you're going to want more and more out of them.

I do appreciate the goals behind the draft-homme-sieve-variables
approach, and I would support it for what it is, but it really only adds
variables to the language in a roundabout way, and only for very limited
string substitution purposes (a la very simple shell variables).
Language evolution will eventually call for more, as will script
writers.  So I say let's allow for the language to grow to the point
where it has real variables, and not do something now that makes that
harder later.  This doesn't mean that I want to shelve the draft;
just adjust some of the terms.  (See #2 message.)

Things I would want to see out of the addition of variables to the
language include:

 - Integration into the language syntax (e.g. not names enclosed in quotes,
   not side-effects of referencing strings);
 - Provision for multiple data types (even if only one is initially
   specified);
 - Operations on variables including expressions and comparisons.

if not:

 - Compound/complex types;
 - scoping.

i.e., things that one would expect of variables in a language.

One interesting thing about this draft is that it really doesn't get in
the way of the sort of native variables I'd like to see.  The furthest
it goes is to preempt the use of the word "variable" -- it's called
"variables," and it calls things "variables."  So one of my suggestions
is to use different words for this draft.

Anyway, that's more or less the executive summary..

-mm-

PS/Disclaimer: not that a disclaimer is needed, but I have an
implementation that includes typed variables, compound structures,
expressions, functions, etc.  However, I don't think this prejudices me
against this draft, since (a) I can easily implement the draft without
disrupting my implementation, and (b) I think a fuller specification of
native SIEVE variables *would* be disruptive to mine.  (i.e. by arguing
for a different SIEVE variables spec, I'm would be arguing for a lot
more work for my implementation to adapt to it.)  And I suppose (c) my
attempt was to implement other language features outside of SIEVE
constructs as much as possible.


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