> > Isn't this a bit confusing having dual purpose for the same functions > > like this? > > How is it confusing? I think it is similar with Base::autoload() which > uses the debug option to throw an exception or not. It can be confusing because the code setting the option and the code using the methods can be at completely different places making it very hard for the programmer to see which type of id it really is. I agree that it is similar to the exceptions. However, setting error handling this way is more common than changing the actual behavior of the method.
> > Is enabling it in the start a requirement (any internal referencing > > done?). If not it would be possible to add an uid option to each of the > > methods that may accept it like > > <code> > > $imap->top(, 325, true ); // second option enables uids. > > </code> > > > > Another option is to have separate methods for uids.. but that will be > > messy.. <code> > > $imap->topUid( 325 ); > > </code> > > I thought of both your ideas, but I decided to implement it with an > option because it seemed easier to understand. Nobody said anything > about it for 3 weeks, so it must be the perfect solution then. Unfortunately I have been offline for three weeks so I couldn't reply before yesterday. Sorry about that. > Having duplicate functions (top, topUid) is not good. I agree. > Adding extra > parameters to functions also doesn't seem right. I think this is (marginally) better. Cheers, Frederik -- Components mailing list [email protected] http://lists.ez.no/mailman/listinfo/components
