{"action":"created","issue":{"url":"https://api.github.com/repos/company-mode/company-mode/issues/336","labels_url":"https://api.github.com/repos/company-mode/company-mode/issues/336/labels{/name}","comments_url":"https://api.github.com/repos/company-mode/company-mode/issues/336/comments","events_url":"https://api.github.com/repos/company-mode/company-mode/issues/336/events","html_url":"https://github.com/company-mode/company-mode/issues/336","id":65064922,"number":336,"title":"company-clang: leave function/method arguments unchanged instead of \"arg0, arg1, ...\"","user":{"login":"ddovod","id":9406025,"avatar_url":"https://avatars.githubusercontent.com/u/9406025?v=3","gravatar_id":"","url":"https://api.github.com/users/ddovod","html_url":"https://github.com/ddovod","followers_url":"https://api.github.com/users/ddovod/followers","following_url":"https://api.github.com/users/ddovod/following{/other_user}","gists_url":"https://api.github.com/users/ddovod/gists{/gist_id}","starred_url":"https://api.github.com/users/ddovod/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ddovod/subscriptions","organizations_url":"https://api.github.com/users/ddovod/orgs","repos_url":"https://api.github.com/users/ddovod/repos","events_url":"https://api.github.com/users/ddovod/events{/privacy}","received_events_url":"https://api.github.com/users/ddovod/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-03-29T14:11:41Z","updated_at":"2015-03-30T13:59:45Z","closed_at":null,"body":"Suppose we have:\r\n```\r\nclass Class\r\n{\r\n    void member(int count, float length, const std::vector<std::pair<int, float>>& params);\r\n};\r\n```\r\nAnd we want to implement the Class::method. When the completion is made, we can see that the arguments are equal to the declaration ones:\r\n```\r\nvoid Class::member(int count, float length, const std::vector<std::pair<int, float>>& params)\r\n```\r\nBut if we press TAB or just leave completed region, all arguments is renamed to arg0, arg1, and so on:\r\n```\r\nvoid Class::member(arg0, arg1, arg2) |\r\n```\r\nIt would be better if the argгments remain unchanged after the completion (see XCode behavior, very handy).\r\n\r\nTemp solution for me:\r\n```\r\ncompany-template.el\r\n187 -                     (format \"arg%d\" counter) sig)\r\n187 +                     (format \"%s\" sig) sig)\r\n```"},"comment":{"url":"https://api.github.com/repos/company-mode/company-mode/issues/comments/87690270","html_url":"https://github.com/company-mode/company-mode/issues/336#issuecomment-87690270","issue_url":"https://api.github.com/repos/company-mode/company-mode/issues/336","id":87690270,"user":{"login":"dgutov","id":271877,"avatar_url":"https://avatars.githubusercontent.com/u/271877?v=3","gravatar_id":"","url":"https://api.github.com/users/dgutov","html_url":"https://github.com/dgutov","followers_url":"https://api.github.com/users/dgutov/followers","following_url":"https://api.github.com/users/dgutov/following{/other_user}","gists_url":"https://api.github.com/users/dgutov/gists{/gist_id}","starred_url":"https://api.github.com/users/dgutov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dgutov/subscriptions","organizations_url":"https://api.github.com/users/dgutov/orgs","repos_url":"https://api.github.com/users/dgutov/repos","events_url":"https://api.github.com/users/dgutov/events{/privacy}","received_events_url":"https://api.github.com/users/dgutov/received_events","type":"User","site_admin":false},"created_at":"2015-03-30T13:59:45Z","updated_at":"2015-03-30T13:59:45Z","body":"> Both errors for me are very similar. Both of them says that in the function call something is wrong.\r\n\r\nThe former version is a bit easier to understand, and to fix with a smaller number of keypresses. Further, not every user is necessarily an experienced C++ developer.\r\n\r\nThe benefits are not that big, I agree, but it's something to keep in mind.\r\n\r\n> :: is not very good indicator (static member functions are called like Class::method)\r\n\r\nSo a static method call starts very similar to an instance method implementation? Augh.\r\n\r\n> If you have a mac os, just try the XCode completion style for c/c++ code.\r\n\r\nI don't. If there are no gifs/videos out you can link to, why not make a mini-screencast yourself?\r\n\r\n> Thank you a lot, Dmitry, and do you speak russian?\r\n\r\nSure. But let's keep conversations here in English, so that anyone can read them."}}