[Top] [All Lists]

Re: List of issues with Sieve notifications

2005-10-19 07:12:48

On Wed, Oct 19, 2005 at 03:28:49PM +0200, Kjetil Torgrim Homme wrote:
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.

no, the argument to :method is a structured value, so we can trivially
know that if :method "foo:whatever" exists without a require
"notify-foo", it's an error.  this is similar to the requirements for

As I said, insisting on require or not is independent of this issue.
In the example above, assume I requested both the sms and the mailto URI
scheme for notify.  I am not talking about pro or con of using require
to request specific methods, but about why putting syntactic elements
in the method specs is bad:

Looking at the example, the option signature consists of one option only
found in mailto, and the method option found in notify, but with a value
that indicates the sms method should be used.

The user could have meant to use mailto, because he set a :from, but
then typed sms as method.  Or he could have meant sms, but typed from
by mistake.  That's the problem with overloading: You don't select
methods by name, but by signature, and if signatures don't match, you
have no idea what could have been meant.

Putting all possible options in the notify spec, no matter if as syntactic
elements, or as generic attribute-value pairs, solves this problem:
The method decides which options to look at and other options are ignored.
That's a rule users can understand very well.