{"action":"created","issue":{"url":"https://api.github.com/repos/nicolas-van/ring.js/issues/13","labels_url":"https://api.github.com/repos/nicolas-van/ring.js/issues/13/labels{/name}","comments_url":"https://api.github.com/repos/nicolas-van/ring.js/issues/13/comments","events_url":"https://api.github.com/repos/nicolas-van/ring.js/issues/13/events","html_url":"https://github.com/nicolas-van/ring.js/issues/13","id":58549608,"number":13,"title":"Static / Class variable inheritance support","user":{"login":"jshthornton","id":2814746,"avatar_url":"https://avatars.githubusercontent.com/u/2814746?v=3","gravatar_id":"","url":"https://api.github.com/users/jshthornton","html_url":"https://github.com/jshthornton","followers_url":"https://api.github.com/users/jshthornton/followers","following_url":"https://api.github.com/users/jshthornton/following{/other_user}","gists_url":"https://api.github.com/users/jshthornton/gists{/gist_id}","starred_url":"https://api.github.com/users/jshthornton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jshthornton/subscriptions","organizations_url":"https://api.github.com/users/jshthornton/orgs","repos_url":"https://api.github.com/users/jshthornton/repos","events_url":"https://api.github.com/users/jshthornton/events{/privacy}","received_events_url":"https://api.github.com/users/jshthornton/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-02-23T07:00:21Z","updated_at":"2015-03-06T12:21:15Z","closed_at":null,"body":"Take the following example:\r\n\r\n```\r\nvar A = ring.create({\r\n});\r\n\r\nA.staticVar = 'foo';\r\n\r\nvar B = ring.create([A], {\r\n});\r\n\r\nconsole.log(A.staticVar); // 'foo'\r\nconsole.log(B.staticVar); // undefined\r\n```"},"comment":{"url":"https://api.github.com/repos/nicolas-van/ring.js/issues/comments/77551008","html_url":"https://github.com/nicolas-van/ring.js/issues/13#issuecomment-77551008","issue_url":"https://api.github.com/repos/nicolas-van/ring.js/issues/13","id":77551008,"user":{"login":"nicolas-van","id":791296,"avatar_url":"https://avatars.githubusercontent.com/u/791296?v=3","gravatar_id":"","url":"https://api.github.com/users/nicolas-van","html_url":"https://github.com/nicolas-van","followers_url":"https://api.github.com/users/nicolas-van/followers","following_url":"https://api.github.com/users/nicolas-van/following{/other_user}","gists_url":"https://api.github.com/users/nicolas-van/gists{/gist_id}","starred_url":"https://api.github.com/users/nicolas-van/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicolas-van/subscriptions","organizations_url":"https://api.github.com/users/nicolas-van/orgs","repos_url":"https://api.github.com/users/nicolas-van/repos","events_url":"https://api.github.com/users/nicolas-van/events{/privacy}","received_events_url":"https://api.github.com/users/nicolas-van/received_events","type":"User","site_admin":false},"created_at":"2015-03-06T12:21:15Z","updated_at":"2015-03-06T12:21:15Z","body":"Yeah, but you don't know the whole story. I'm planning for version 2.1 to add a feature to modify the prototype of existing classes and have it impact the child classes. So each time I modify the code I think about that future feature.\r\n\r\nAnother, more important, point for me is the \"purity\" and usefulness of such a feature. As far as I know, static members are not much more than syntactic sugar in a lot of languages and are not really related to OO programming.\r\n\r\nIn C++ static functions are mostly useful because they allow access to private members of a class (useless in JavaScript). In Java they are used in place of function because... you know... *there are no functions in Java*. When I have time I'll dig a little to understand the rationale to implement it in Python.\r\n\r\nUntil now I don't see the usefulness of having a member of a class that gets \"inherited\" and can be overridden in child classes, knowing that it's extremely rare to get that member other than by specifying explicitly the name of that class (thus it's really not different than a simple function or variable).\r\n\r\nIf you want to argument to try to convince me I am open. Just know that I don't want to include that feature just to \"do like Java\"."}}