On Thu, Aug 27, 2015 at 3:35 AM, Romain Bardou wrote: > > I agree about smaller, independent packages. This is a very general API > design principle: avoid coupling (the fact that using a module implies > using another). This may be the main reason I avoid external libraries. For > instance, Martin Jambon's Yojson depends on biniou, cppo and easy-format. I > believe Martin is an awesome programmer but this particular point just > baffles me as there is absolutely no need for *any* external dependency to > solve such a simple problem (JSON parsing, pretty-printing and AST > constructors). I understand that Martin wants to reuse its own code and be > able to integrate Yojson easily with other libraries of his, and that is > great. For him and users of his other libraries. Not for those who just > want a JSON parser and have had to install all dependencies manually on > Windows. > Part of the promise of an ecosystem of small libraries is that you should be able to use them for any code you write, including other libraries. This is not the same thing as API coupling; as an end user of library C you should be able to use it without caring about whether it is self-contained in terms of code or whether it uses libraries A and B internally. The fact that dependencies need to be installed manually on windows is a failure of the ocaml windows ecosystem (which I'm definitely sympathetic towards; I once had to manually copy a bunch of code from batteries into my own project just to avoid depending on it); it is not a sign that libraries need not to depend on each other. martin