{"action":"created","issue":{"url":"https://api.github.com/repos/ethereum/solidity/issues/535","repository_url":"https://api.github.com/repos/ethereum/solidity","labels_url":"https://api.github.com/repos/ethereum/solidity/issues/535/labels{/name}","comments_url":"https://api.github.com/repos/ethereum/solidity/issues/535/comments","events_url":"https://api.github.com/repos/ethereum/solidity/issues/535/events","html_url":"https://github.com/ethereum/solidity/issues/535","id":152629783,"number":535,"title":"Function/modifier name can be a single underscore","user":{"login":"axic","id":20340,"avatar_url":"https://avatars.githubusercontent.com/u/20340?v=3","gravatar_id":"","url":"https://api.github.com/users/axic","html_url":"https://github.com/axic","followers_url":"https://api.github.com/users/axic/followers","following_url":"https://api.github.com/users/axic/following{/other_user}","gists_url":"https://api.github.com/users/axic/gists{/gist_id}","starred_url":"https://api.github.com/users/axic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/axic/subscriptions","organizations_url":"https://api.github.com/users/axic/orgs","repos_url":"https://api.github.com/users/axic/repos","events_url":"https://api.github.com/users/axic/events{/privacy}","received_events_url":"https://api.github.com/users/axic/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ethereum/solidity/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-05-02T19:51:08Z","updated_at":"2016-05-03T09:42:47Z","closed_at":null,"body":"Functions and modifiers can be a single underscore:\r\n\r\n```\r\nfunction _() {\r\n}\r\n```\r\n\r\nor\r\n\r\n```\r\nmodifier _ {\r\n}\r\n```\r\n\r\nis valid.\r\n\r\nThis is problematic at least in the case someone tries to refer to this method in a modifier, where it clashes with the `_` keyword:\r\n\r\n```\r\nfunction _() {\r\n}\r\n    \r\nmodifier wrong {\r\n  _()\r\n  _\r\n}\r\n```\r\n\r\nresults in:\r\n\r\n```\r\nUntitled1:29:9: Error: Expected token Semicolon got 'Identifier'\r\n        _\r\n        ^\r\n```\r\n\r\nI think the single underscore name should be disallowed. Furthermore I think trailing underscores should be too, i.e. `wrongMethod__` should be invalid. \r\n"},"comment":{"url":"https://api.github.com/repos/ethereum/solidity/issues/comments/216481547","html_url":"https://github.com/ethereum/solidity/issues/535#issuecomment-216481547","issue_url":"https://api.github.com/repos/ethereum/solidity/issues/535","id":216481547,"user":{"login":"chriseth","id":9073706,"avatar_url":"https://avatars.githubusercontent.com/u/9073706?v=3","gravatar_id":"","url":"https://api.github.com/users/chriseth","html_url":"https://github.com/chriseth","followers_url":"https://api.github.com/users/chriseth/followers","following_url":"https://api.github.com/users/chriseth/following{/other_user}","gists_url":"https://api.github.com/users/chriseth/gists{/gist_id}","starred_url":"https://api.github.com/users/chriseth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chriseth/subscriptions","organizations_url":"https://api.github.com/users/chriseth/orgs","repos_url":"https://api.github.com/users/chriseth/repos","events_url":"https://api.github.com/users/chriseth/events{/privacy}","received_events_url":"https://api.github.com/users/chriseth/received_events","type":"User","site_admin":false},"created_at":"2016-05-03T09:42:47Z","updated_at":"2016-05-03T09:42:47Z","body":"Solidity aligns with javascript here: `_` is a perfectly valid identifier. It is a bit unfortunate, that it cannot be used in modifiers, but I think we have to live with that for now."}}