
Hi!
On Wed, Apr 7, 2010 at 3:58 PM, Felipe Lessa
On Wed, Apr 07, 2010 at 03:33:51PM +0200, Johan Tibell wrote:
Yet, if we add all the function compositions that some group of people use in their code our APIs get much more complicated.
I completely agree, but I think you're overreacting to this proposal (no offense intended, please :]). I don't see a tendency of adding every combinator to the libraries, and I don't think this proposal will change anything.
I'm certainly trying to make a general argument that's larger than this proposal and the important part I want to get across is the criteria used to decide what functions to add to the (base) libraries. In particular I want us to establish that the the following arguments aren't strong enough: - X people use this composition a lot so we should add it. - We added something like this before (e.g. added flipped versions of some operators) so doing it again is fine. Here are some good reasons to add something to an API: - X is not expressible using the current API (or this very difficult/error prone to express). - X is cannot be written efficiently (in terms of run-time performance/space usage) using the current API. - The API exports function X but what it really should have exported was combinators Y and Z (that e.g. make the API more general/composable/etc). Cheers, Johan