{"action":"created","issue":{"url":"https://api.github.com/repos/pozadi/kefir/issues/50","labels_url":"https://api.github.com/repos/pozadi/kefir/issues/50/labels{/name}","comments_url":"https://api.github.com/repos/pozadi/kefir/issues/50/comments","events_url":"https://api.github.com/repos/pozadi/kefir/issues/50/events","html_url":"https://github.com/pozadi/kefir/issues/50","id":57312506,"number":50,"title":"a way to get the current value of a property","user":{"login":"mhelvens","id":4012816,"avatar_url":"https://avatars.githubusercontent.com/u/4012816?v=3","gravatar_id":"","url":"https://api.github.com/users/mhelvens","html_url":"https://github.com/mhelvens","followers_url":"https://api.github.com/users/mhelvens/followers","following_url":"https://api.github.com/users/mhelvens/following{/other_user}","gists_url":"https://api.github.com/users/mhelvens/gists{/gist_id}","starred_url":"https://api.github.com/users/mhelvens/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mhelvens/subscriptions","organizations_url":"https://api.github.com/users/mhelvens/orgs","repos_url":"https://api.github.com/users/mhelvens/repos","events_url":"https://api.github.com/users/mhelvens/events{/privacy}","received_events_url":"https://api.github.com/users/mhelvens/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-02-11T12:58:00Z","updated_at":"2015-02-11T16:58:26Z","closed_at":null,"body":"Kefir.js, like Bacon.js, doesn't offer an easy way to get the *current value* from a property:\r\n\r\n    property.currentValue()\r\n\r\nThis is for reasons of purism, I believe. I.e., we're not *supposed to want* to get the current value that way. Is that correct? If so, could you explain the benefits of this philosophy?\r\n\r\nIn any case, I would like to request this as a feature. There is already a way to twist the public interface to do it anyway:\r\n\r\n    var current;\r\n    var fn = function (v) { current = v };\r\n    property.onValue(fn);\r\n    property.offValue(fn);\r\n\r\nWhy not provide a method or (read-only) property to do this the easy way?"},"comment":{"url":"https://api.github.com/repos/pozadi/kefir/issues/comments/73918112","html_url":"https://github.com/pozadi/kefir/issues/50#issuecomment-73918112","issue_url":"https://api.github.com/repos/pozadi/kefir/issues/50","id":73918112,"user":{"login":"pozadi","id":825702,"avatar_url":"https://avatars.githubusercontent.com/u/825702?v=3","gravatar_id":"","url":"https://api.github.com/users/pozadi","html_url":"https://github.com/pozadi","followers_url":"https://api.github.com/users/pozadi/followers","following_url":"https://api.github.com/users/pozadi/following{/other_user}","gists_url":"https://api.github.com/users/pozadi/gists{/gist_id}","starred_url":"https://api.github.com/users/pozadi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pozadi/subscriptions","organizations_url":"https://api.github.com/users/pozadi/orgs","repos_url":"https://api.github.com/users/pozadi/repos","events_url":"https://api.github.com/users/pozadi/events{/privacy}","received_events_url":"https://api.github.com/users/pozadi/received_events","type":"User","site_admin":false},"created_at":"2015-02-11T16:58:26Z","updated_at":"2015-02-11T16:58:26Z","body":"I also afraid people might overuse that feature e.g., will do things like:\r\n\r\n```js\r\nstream.map(function() {\r\n  return property.currentValue();\r\n});\r\n```\r\n\r\ninstead of:\r\n\r\n```js\r\nproperty.sampledBy(stream);\r\n```\r\n\r\nI guess there might be a lot of cases how it might be overused."}}