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

Re: Sieve extensions

1998-01-18 16:00:36
Date: Sun, 18 Jan 1998 16:38:19 -0500 (EST)
From: Rob Earhart <earhart+(_at_)cmu(_dot_)edu>

Ned Freed <Ned(_dot_)Freed(_at_)innosoft(_dot_)com> writes:
I also don't like the compromises in language design having an
extensible language implies. We've adopted the position that the
language we specify has to be reasonably reader-friendly. And
extensible languages more or less by definition imply either syntactic
rigidity (e.g., PPL, the simpler LISPs, Forth, the simpler functional
languages) or some sort of fairly sophisticated macro facility (e.g.,
the more complex LISPs, the more complex functional languages, Tex and
MetaFont, ASN.1 1988). The rigidity we don't want and the complexity we
cannot tolerate.

  By "rigid", I assume you mean, "regular, such that the syntactic
rules are fairly simple, and there aren't any exceptions"?

  Actually, that's one of the big arguments in favor of having a
regular syntax.  A regular syntax doesn't imply that it's less
reader-friendly; it means that there's an abstract syntax for things
like "command" and "expression" which all extensions have to obey.

A regular syntax means you can't add new constructs that don't look like
old constructs, you can only add things like "commands" and "expressions",
never "loops" or "variables" (unless you do something really bizarre).

  Historically, I can't think of a single language whose syntax had
lots of exceptions which didn't turn out to either be a miserable flop
for programming (the unix shells, most noteable csh, are a pretty good
example of the phenomenon), or which greatly cleaned up its syntax as
it evolved (perl's a good example).

Perl does not have a clean syntax.  It has a few lucky assumptions that let
the programmers and new features at will, and has been fairly extensible as
a result of that.

Having a standard syntax for tests and actions would be very beneficial;
it'd certainly prevent future extensions from doing anything dumb
unnecessarily.  The point of contention isn't that a regular syntax is good
or bad -- it's good -- but rather that extensions can extend the regular
syntax, if it's called for.

There's one difference between any language you care to name and Sieve.
The basic question is if old parsers always be able to parse scripts with
extensions.  Perl 4 can't parse perl5's syntax extensions; it's just
handled by a little line of common syntax at the beginning of the script
telling the kernel which interpreter it wants to pipe stuff through --
"#!/usr/local/bin/perl5".  C can't parse C++, old LISPs can't parse
CommonLISP backquoting.

I agree with Ned; I'd like some special metadata listing the extensions a
script needs to run, and I'd like to do away with support.

I want to add the generalized syntax to the draft; it'll simplify the
grammar anyway.

-- 
                                          Tim Showalter 
tjs+(_at_)andrew(_dot_)cmu(_dot_)edu


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