{"action":"created","issue":{"url":"https://api.github.com/repos/fantasyland/fantasy-land/issues/145","repository_url":"https://api.github.com/repos/fantasyland/fantasy-land","labels_url":"https://api.github.com/repos/fantasyland/fantasy-land/issues/145/labels{/name}","comments_url":"https://api.github.com/repos/fantasyland/fantasy-land/issues/145/comments","events_url":"https://api.github.com/repos/fantasyland/fantasy-land/issues/145/events","html_url":"https://github.com/fantasyland/fantasy-land/pull/145","id":167595857,"number":145,"title":"Flip arguments order in ap","user":{"login":"rpominov","id":825702,"avatar_url":"https://avatars.githubusercontent.com/u/825702?v=3","gravatar_id":"","url":"https://api.github.com/users/rpominov","html_url":"https://github.com/rpominov","followers_url":"https://api.github.com/users/rpominov/followers","following_url":"https://api.github.com/users/rpominov/following{/other_user}","gists_url":"https://api.github.com/users/rpominov/gists{/gist_id}","starred_url":"https://api.github.com/users/rpominov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rpominov/subscriptions","organizations_url":"https://api.github.com/users/rpominov/orgs","repos_url":"https://api.github.com/users/rpominov/repos","events_url":"https://api.github.com/users/rpominov/events{/privacy}","received_events_url":"https://api.github.com/users/rpominov/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":13,"created_at":"2016-07-26T12:33:03Z","updated_at":"2016-08-05T11:27:25Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/fantasyland/fantasy-land/pulls/145","html_url":"https://github.com/fantasyland/fantasy-land/pull/145","diff_url":"https://github.com/fantasyland/fantasy-land/pull/145.diff","patch_url":"https://github.com/fantasyland/fantasy-land/pull/145.patch"},"body":"See #50 and #144\r\n\r\nThis is a breaking change and we have two options how to do it:\r\n\r\n 1. Like any other changes that were done before (except they weren't breaking)\r\n 2. Add prefixes to method names (#122) and bump major version number\r\n\r\nIf we go with the first option there will be a period when some libraries already updated but some not, so they might not work well with each other. For example a code like this may stop working:\r\n\r\n```js\r\nimport R from 'ramda'\r\nimport Foo from 'foo'\r\n\r\na = R.lift(x => y => x + y, Foo.of(1), Foo.of(2))\r\n```\r\n\r\nIn this case users of libraries will have to freeze their dependencies' versions until all libs are updated.\r\n\r\nIf we do the second, a user of the libraries will be able to force one that already updated to work in `v0.2` mode, by installing `fantasy-land@0.2.1` instead of `fantasy-land@1.0.0`. But the library that updated will need to support this too, by doing something like:\r\n\r\n```js\r\nimport fl from 'fantasy-land'\r\n\r\nconst lift2 = fl.version // supposedly we add .version property in 1.0\r\n  ? (fn, x, y) => x[fl.map](x => y => fn(x, y))[fl.ap](y)\r\n  : (fn, x, y) => y[fl.ap](x[fl.map](x => y => fn(x, y)))\r\n\r\nexport default lift2\r\n```\r\n\r\nCurrently PR implements the first option, and I'll be happy to update it to the second if we decide so. And I, for one, think that we should go with the second option.\r\n\r\nWhatever we decide, I think we should wait for some time before merging so everybody will have a chance to discuss."},"comment":{"url":"https://api.github.com/repos/fantasyland/fantasy-land/issues/comments/237827468","html_url":"https://github.com/fantasyland/fantasy-land/pull/145#issuecomment-237827468","issue_url":"https://api.github.com/repos/fantasyland/fantasy-land/issues/145","id":237827468,"user":{"login":"davidchambers","id":210406,"avatar_url":"https://avatars.githubusercontent.com/u/210406?v=3","gravatar_id":"","url":"https://api.github.com/users/davidchambers","html_url":"https://github.com/davidchambers","followers_url":"https://api.github.com/users/davidchambers/followers","following_url":"https://api.github.com/users/davidchambers/following{/other_user}","gists_url":"https://api.github.com/users/davidchambers/gists{/gist_id}","starred_url":"https://api.github.com/users/davidchambers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidchambers/subscriptions","organizations_url":"https://api.github.com/users/davidchambers/orgs","repos_url":"https://api.github.com/users/davidchambers/repos","events_url":"https://api.github.com/users/davidchambers/events{/privacy}","received_events_url":"https://api.github.com/users/davidchambers/received_events","type":"User","site_admin":false},"created_at":"2016-08-05T11:27:25Z","updated_at":"2016-08-05T11:27:25Z","body":"> [C]ould someone spell out how a library could support one type that implements the `0.3.x` version of `ap` and another that supports `1.x` at the same time?\r\n\r\nThe library would need to provide two versions of each `ap`-related function, I think. In Ramda's case, the library could provide both `R.ap` and `R._ap`.\r\n\r\n> Or is there a constraint imposed on the user of such a library to pick one version that all types and supporting libraries must support in their application?\r\n\r\nIt needn't be all or nothing, but the burden would be on the user to know with which version of FL each of her data types is compatible, and choose—for example—`R.ap` or `R._ap` as appropriate.\r\n\r\nThis would, though, undermine one of the main benefits of FL: the ability to define functions which operate on many data types *without specific knowledge of these data types*.\r\n\r\nIf we're to make this change, I don't foresee a seamless transition. It seems the best approach would be to update the `ap` implementations for all the data types as quickly as possible, then release a new version of Ramda compatible with these updated data types.\r\n"}}
{"actor":{"display_login":"davidchambers"}}