gregtatcam / imaplet-lwt

imaplet revamp with Lwt
19 stars 6 forks source link

Avoid global state for configuration #4

Closed samoht closed 9 years ago

samoht commented 9 years ago

It would be great if we could use imaplet as a stand-alone library. In order to do so, it is important to avoid global and shared state: ideally they should be passed around as function parameters, and it should be possible for the library user to build such a configuration value easily.

A good rule (usually) is to not let mutable state cross module boundaries: mli files should hide everything that is mutable and global.

gregtatcam commented 9 years ago

restructured to be installed as Imaplet_server library and imaplet executable.