Hi Andras,
On Fri, May 06, 2016 at 10:38:42AM +0100, Andras Salamon wrote:
> On Thu, May 05, 2016 at 11:44:42PM -0400, Damien Riegel wrote:
> >This patchset allows to open a mailbox without relying on ctx->magic.
> >
> >The different parts of the codebase are very tightly coupled. The goal
> >of this patchset is to start decoupling maiboxes of the rest of the
> >application.
>
> Could you expand on why this is a good thing? mutt is a mail reader,
> and "decoupling" it from its central object seems to have a specific
> goal. If this is the case, please state that goal, or if not then
> please clarify your intent.
There is no secret agenda here, my intent is simply to increase
maintainability. Decoupling just means that we could hide different kind
of mailbox implementations behind a common set of operations. For
instance, does it make sense to have more than 90 occurences of
"#ifdef USE_IMAP" in the codebase?
If we keep adding operations, such as sync, commit_message, and so on,
to mx_ops, we could already get rid of most of the #ifdef USE_XXX and
{if,switch}(ctx->magic) in mx.c, and use only one ifdef in the very
beginning to decide if we register related mailbox operations or not.
I hope this clarify the patchset's intent. I know this is a fairly large
patchset for a newcomer, but it could easily be split into smaller
patchsets. This was just to show the final result.
Thanks,
--
Damien