{"action":"created","issue":{"url":"https://api.github.com/repos/wch/R6/issues/66","repository_url":"https://api.github.com/repos/wch/R6","labels_url":"https://api.github.com/repos/wch/R6/issues/66/labels{/name}","comments_url":"https://api.github.com/repos/wch/R6/issues/66/comments","events_url":"https://api.github.com/repos/wch/R6/issues/66/events","html_url":"https://github.com/wch/R6/issues/66","id":90777505,"number":66,"title":"Consider adding static methods/fields","user":{"login":"wch","id":86978,"avatar_url":"https://avatars.githubusercontent.com/u/86978?v=3","gravatar_id":"","url":"https://api.github.com/users/wch","html_url":"https://github.com/wch","followers_url":"https://api.github.com/users/wch/followers","following_url":"https://api.github.com/users/wch/following{/other_user}","gists_url":"https://api.github.com/users/wch/gists{/gist_id}","starred_url":"https://api.github.com/users/wch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wch/subscriptions","organizations_url":"https://api.github.com/users/wch/orgs","repos_url":"https://api.github.com/users/wch/repos","events_url":"https://api.github.com/users/wch/events{/privacy}","received_events_url":"https://api.github.com/users/wch/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2015-06-24T20:50:38Z","updated_at":"2016-09-23T19:59:49Z","closed_at":null,"body":"If a generator is named `MyClass`, it would be nice to be able to call `MyClass$foo()`. And inside of methods, you'd call `class$foo()`."},"comment":{"url":"https://api.github.com/repos/wch/R6/issues/comments/249288278","html_url":"https://github.com/wch/R6/issues/66#issuecomment-249288278","issue_url":"https://api.github.com/repos/wch/R6/issues/66","id":249288278,"user":{"login":"gaborcsardi","id":660288,"avatar_url":"https://avatars.githubusercontent.com/u/660288?v=3","gravatar_id":"","url":"https://api.github.com/users/gaborcsardi","html_url":"https://github.com/gaborcsardi","followers_url":"https://api.github.com/users/gaborcsardi/followers","following_url":"https://api.github.com/users/gaborcsardi/following{/other_user}","gists_url":"https://api.github.com/users/gaborcsardi/gists{/gist_id}","starred_url":"https://api.github.com/users/gaborcsardi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gaborcsardi/subscriptions","organizations_url":"https://api.github.com/users/gaborcsardi/orgs","repos_url":"https://api.github.com/users/gaborcsardi/repos","events_url":"https://api.github.com/users/gaborcsardi/events{/privacy}","received_events_url":"https://api.github.com/users/gaborcsardi/received_events","type":"User","site_admin":false},"created_at":"2016-09-23T19:59:49Z","updated_at":"2016-09-23T19:59:49Z","body":"How about just not keeping the static methods/variables for objects? If the user needs the static methods, they'll just use the generator. If an object needs the static method, they can refer to the generator explicitly.\r\n\r\nThe generator is not environment, so it does not have reference semantics currently. But maybe we can work around that somehow, e.g. sticking in a member that is an environment: `generator$static <- new.env()`.\r\n\r\nCurrently I do use static *constants*, that belong to the class. I just stick them to the generator: `generator$myconstant <- \"foo\"` I guess I might as well put them in the objects, behind an active binding, or as a private member with a get method....\r\n\r\nJust thinking aloud, really.\r\n"}}
{"actor":{"display_login":"gaborcsardi"}}