{"action":"created","issue":{"url":"https://api.github.com/repos/daokoder/dao/issues/401","labels_url":"https://api.github.com/repos/daokoder/dao/issues/401/labels{/name}","comments_url":"https://api.github.com/repos/daokoder/dao/issues/401/comments","events_url":"https://api.github.com/repos/daokoder/dao/issues/401/events","html_url":"https://github.com/daokoder/dao/issues/401","id":85742393,"number":401,"title":"Disable definition of methods outside of class body","user":{"login":"Night-walker","id":5074460,"avatar_url":"https://avatars.githubusercontent.com/u/5074460?v=3","gravatar_id":"","url":"https://api.github.com/users/Night-walker","html_url":"https://github.com/Night-walker","followers_url":"https://api.github.com/users/Night-walker/followers","following_url":"https://api.github.com/users/Night-walker/following{/other_user}","gists_url":"https://api.github.com/users/Night-walker/gists{/gist_id}","starred_url":"https://api.github.com/users/Night-walker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Night-walker/subscriptions","organizations_url":"https://api.github.com/users/Night-walker/orgs","repos_url":"https://api.github.com/users/Night-walker/repos","events_url":"https://api.github.com/users/Night-walker/events{/privacy}","received_events_url":"https://api.github.com/users/Night-walker/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-06-06T11:43:16Z","updated_at":"2015-06-12T14:32:47Z","closed_at":null,"body":"I really see no point in supporting C++-like definitions of methods outside of the body of their class. We don't have headers, so the most probable gain from this feature is extra verbosity and chaos in code. I believe it should be disabled, together with the ability to declare non-interface methods without body."},"comment":{"url":"https://api.github.com/repos/daokoder/dao/issues/comments/111513532","html_url":"https://github.com/daokoder/dao/issues/401#issuecomment-111513532","issue_url":"https://api.github.com/repos/daokoder/dao/issues/401","id":111513532,"user":{"login":"daokoder","id":1860002,"avatar_url":"https://avatars.githubusercontent.com/u/1860002?v=3","gravatar_id":"","url":"https://api.github.com/users/daokoder","html_url":"https://github.com/daokoder","followers_url":"https://api.github.com/users/daokoder/followers","following_url":"https://api.github.com/users/daokoder/following{/other_user}","gists_url":"https://api.github.com/users/daokoder/gists{/gist_id}","starred_url":"https://api.github.com/users/daokoder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daokoder/subscriptions","organizations_url":"https://api.github.com/users/daokoder/orgs","repos_url":"https://api.github.com/users/daokoder/repos","events_url":"https://api.github.com/users/daokoder/events{/privacy}","received_events_url":"https://api.github.com/users/daokoder/received_events","type":"User","site_admin":false},"created_at":"2015-06-12T14:32:47Z","updated_at":"2015-06-12T14:32:47Z","body":"I think avoiding method definition outside of class body may be less convenient sometimes, when a class is big and its methods are long. In such cases, the class body will be exceedingly long, and some blocks are nested in exceedingly deep levels. Also, placing method declarations together may be better for readability, since one can see at a glance what a class can do with what methods.\r\n\r\nOf course, allowing implementation of class methods at arbitrary locations is clearly a bad idea, so I prefer to go with a compromised solution, which is, methods implementation must be in the same file as the class definition. (The restriction could be further strengthened by not allowing definition of any other classes, but this may just provide very limited benefit.) This is already done, BTW."}}