On Tue, Oct 18, 2005 at 11:15:53PM +0200, Kjetil Torgrim Homme wrote:
o Invent new generic options that cover all methods and each method
picks the options it understands and ignores the rest. This extends
URIs in an invisible way, but having the options in the notify spec
is a problem if a new scheme needs more. Putting them in the method
specs sounds very bad to me.
why is putting them in the method spec bad? adding syntax elements does
mean we need an extension for each method, e.g., require "notify-sms",
but I don't think that is a bad thing at all. it means the user will
have a way of knowing which notification methods are supported,
something he can't do today.
Putting options in the method spec is bad, because basically it
introduces overloading. Suddenly, a parser could not detect
errors on unknown options when parsing the notify arguments, but
first must parse all options, and then semantic analysis has to
find out if there is a signature for them.
Say you have two methods:
"sms", which offers the option "route" to specify the route
"mailto", which offers the option "from" to specify the sender
What's the error message on:
notify :from "sender(_at_)example(_dot_)com" :method "sms:0123456789" ;
It is: No matching option signature. Now that's an error users are
really going to hate.
Right now, the only Sieve extension introducing something similar is
"copy". To me, it looks like nobody thought about what an extension like
that really means, but since it is the only one, everything is fine.
Is it overloading or just an extension? Say I invent a new extension
that introduces another option for fileinto. If extensions overloaded
the option signature, I couldn't mix it with "copy". If I could, then
it must not modify the implicit keep flag. Oops.
The sieve specification contains a small grammar, expressed formally,
and a large semantic part, expressed in natural language. IMHO, the
latter is the weak part, because it leaves too much freedom. Please,
let's not open this can of worms.
All this is independent of having to request methods by a Sieve
extensions or not.
Michael