{"action":"created","issue":{"url":"https://api.github.com/repos/ReactiveCocoa/ReactiveSwift/issues/661","repository_url":"https://api.github.com/repos/ReactiveCocoa/ReactiveSwift","labels_url":"https://api.github.com/repos/ReactiveCocoa/ReactiveSwift/issues/661/labels{/name}","comments_url":"https://api.github.com/repos/ReactiveCocoa/ReactiveSwift/issues/661/comments","events_url":"https://api.github.com/repos/ReactiveCocoa/ReactiveSwift/issues/661/events","html_url":"https://github.com/ReactiveCocoa/ReactiveSwift/issues/661","id":345896131,"node_id":"MDU6SXNzdWUzNDU4OTYxMzE=","number":661,"title":"Stream of one event.","user":{"login":"andersio","id":11806295,"node_id":"MDQ6VXNlcjExODA2Mjk1","avatar_url":"https://avatars1.githubusercontent.com/u/11806295?v=4","gravatar_id":"","url":"https://api.github.com/users/andersio","html_url":"https://github.com/andersio","followers_url":"https://api.github.com/users/andersio/followers","following_url":"https://api.github.com/users/andersio/following{/other_user}","gists_url":"https://api.github.com/users/andersio/gists{/gist_id}","starred_url":"https://api.github.com/users/andersio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andersio/subscriptions","organizations_url":"https://api.github.com/users/andersio/orgs","repos_url":"https://api.github.com/users/andersio/repos","events_url":"https://api.github.com/users/andersio/events{/privacy}","received_events_url":"https://api.github.com/users/andersio/received_events","type":"User","site_admin":false},"labels":[{"id":512382309,"node_id":"MDU6TGFiZWw1MTIzODIzMDk=","url":"https://api.github.com/repos/ReactiveCocoa/ReactiveSwift/labels/work%20in%20progress","name":"work in progress","color":"fef2c0","default":false}],"state":"open","locked":false,"assignee":{"login":"andersio","id":11806295,"node_id":"MDQ6VXNlcjExODA2Mjk1","avatar_url":"https://avatars1.githubusercontent.com/u/11806295?v=4","gravatar_id":"","url":"https://api.github.com/users/andersio","html_url":"https://github.com/andersio","followers_url":"https://api.github.com/users/andersio/followers","following_url":"https://api.github.com/users/andersio/following{/other_user}","gists_url":"https://api.github.com/users/andersio/gists{/gist_id}","starred_url":"https://api.github.com/users/andersio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andersio/subscriptions","organizations_url":"https://api.github.com/users/andersio/orgs","repos_url":"https://api.github.com/users/andersio/repos","events_url":"https://api.github.com/users/andersio/events{/privacy}","received_events_url":"https://api.github.com/users/andersio/received_events","type":"User","site_admin":false},"assignees":[{"login":"andersio","id":11806295,"node_id":"MDQ6VXNlcjExODA2Mjk1","avatar_url":"https://avatars1.githubusercontent.com/u/11806295?v=4","gravatar_id":"","url":"https://api.github.com/users/andersio","html_url":"https://github.com/andersio","followers_url":"https://api.github.com/users/andersio/followers","following_url":"https://api.github.com/users/andersio/following{/other_user}","gists_url":"https://api.github.com/users/andersio/gists{/gist_id}","starred_url":"https://api.github.com/users/andersio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andersio/subscriptions","organizations_url":"https://api.github.com/users/andersio/orgs","repos_url":"https://api.github.com/users/andersio/repos","events_url":"https://api.github.com/users/andersio/events{/privacy}","received_events_url":"https://api.github.com/users/andersio/received_events","type":"User","site_admin":false}],"milestone":null,"comments":4,"created_at":"2018-07-30T19:13:52Z","updated_at":"2018-08-13T14:58:39Z","closed_at":null,"author_association":"MEMBER","body":"aka `Single` #201 or (lazy?) `Promise` or (lazy?) `Future`.\r\n[Prototype](https://github.com/ReactiveCocoa/ReactiveSwift/compare/anders/promise)\r\n\r\nThe RAC team is considering moving this forward. Apparently we would be able to provide a more concise API on top of the stronger compiler guarantees, and it is observed that the value-or-failure are quite commonly used, especially in modelling network requests or API queries.\r\n\r\nA few design decisions need to be discussed:\r\n\r\n1. Should it be cold or \"warm\"?\r\n\r\n   Proposal: Cold by default, opt-in replay via `replayLazily()`?\r\n\r\n2. Should it be called `Promise` or `Future` if it isn't \"warm\" by default?\r\n\r\n3. How should we model the event?\r\n\r\n    Proposal:\r\n    ```swift\r\n    extension Promise {\r\n        public enum Event {\r\n             case completed(Value)\r\n             case failed(Error)\r\n             case interrupted\r\n        }\r\n    }\r\n    ```\r\n\r\n4. Should we support operator lifting as part of the public API? It can be made safe if we always apply `take(last: 1)` as part of the lifting."},"comment":{"url":"https://api.github.com/repos/ReactiveCocoa/ReactiveSwift/issues/comments/412548347","html_url":"https://github.com/ReactiveCocoa/ReactiveSwift/issues/661#issuecomment-412548347","issue_url":"https://api.github.com/repos/ReactiveCocoa/ReactiveSwift/issues/661","id":412548347,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMjU0ODM0Nw==","user":{"login":"leonid-s-usov","id":3144935,"node_id":"MDQ6VXNlcjMxNDQ5MzU=","avatar_url":"https://avatars3.githubusercontent.com/u/3144935?v=4","gravatar_id":"","url":"https://api.github.com/users/leonid-s-usov","html_url":"https://github.com/leonid-s-usov","followers_url":"https://api.github.com/users/leonid-s-usov/followers","following_url":"https://api.github.com/users/leonid-s-usov/following{/other_user}","gists_url":"https://api.github.com/users/leonid-s-usov/gists{/gist_id}","starred_url":"https://api.github.com/users/leonid-s-usov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leonid-s-usov/subscriptions","organizations_url":"https://api.github.com/users/leonid-s-usov/orgs","repos_url":"https://api.github.com/users/leonid-s-usov/repos","events_url":"https://api.github.com/users/leonid-s-usov/events{/privacy}","received_events_url":"https://api.github.com/users/leonid-s-usov/received_events","type":"User","site_admin":false},"created_at":"2018-08-13T14:58:39Z","updated_at":"2018-08-13T14:58:39Z","author_association":"NONE","body":"Looks awkward, but maybe we could introduce here `PromiseProducer` which is cold and subject to `replayLazily()`? Because `Promise` should be warm - well, if we are going for that name. Hopefully we are. You know, the one having `.then()` method ..."}}
{"actor":{"display_login":"leonid-s-usov"}}