{"action":"closed","issue":{"url":"https://api.github.com/repos/dotnet/roslyn/issues/7","labels_url":"https://api.github.com/repos/dotnet/roslyn/issues/7/labels{/name}","comments_url":"https://api.github.com/repos/dotnet/roslyn/issues/7/comments","events_url":"https://api.github.com/repos/dotnet/roslyn/issues/7/events","html_url":"https://github.com/dotnet/roslyn/issues/7","id":54406400,"number":7,"title":"Feature: Parameter Name Aliasing","user":{"login":"am11","id":3840695,"avatar_url":"https://avatars.githubusercontent.com/u/3840695?v=3","gravatar_id":"","url":"https://api.github.com/users/am11","html_url":"https://github.com/am11","followers_url":"https://api.github.com/users/am11/followers","following_url":"https://api.github.com/users/am11/following{/other_user}","gists_url":"https://api.github.com/users/am11/gists{/gist_id}","starred_url":"https://api.github.com/users/am11/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/am11/subscriptions","organizations_url":"https://api.github.com/users/am11/orgs","repos_url":"https://api.github.com/users/am11/repos","events_url":"https://api.github.com/users/am11/events{/privacy}","received_events_url":"https://api.github.com/users/am11/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/dotnet/roslyn/labels/Area-Language%20Design","name":"Area-Language Design","color":"5319e7"},{"url":"https://api.github.com/repos/dotnet/roslyn/labels/Feature%20Request","name":"Feature Request","color":"fc2929"},{"url":"https://api.github.com/repos/dotnet/roslyn/labels/Language-C%23","name":"Language-C#","color":"207de5"},{"url":"https://api.github.com/repos/dotnet/roslyn/labels/Resolution-Won't%20Fix","name":"Resolution-Won't Fix","color":"cccccc"},{"url":"https://api.github.com/repos/dotnet/roslyn/labels/Verification%20Not%20Required","name":"Verification Not Required","color":"006400"}],"state":"closed","locked":false,"assignee":{"login":"MadsTorgersen","id":6677272,"avatar_url":"https://avatars.githubusercontent.com/u/6677272?v=3","gravatar_id":"","url":"https://api.github.com/users/MadsTorgersen","html_url":"https://github.com/MadsTorgersen","followers_url":"https://api.github.com/users/MadsTorgersen/followers","following_url":"https://api.github.com/users/MadsTorgersen/following{/other_user}","gists_url":"https://api.github.com/users/MadsTorgersen/gists{/gist_id}","starred_url":"https://api.github.com/users/MadsTorgersen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MadsTorgersen/subscriptions","organizations_url":"https://api.github.com/users/MadsTorgersen/orgs","repos_url":"https://api.github.com/users/MadsTorgersen/repos","events_url":"https://api.github.com/users/MadsTorgersen/events{/privacy}","received_events_url":"https://api.github.com/users/MadsTorgersen/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/dotnet/roslyn/milestones/2","html_url":"https://github.com/dotnet/roslyn/milestones/Unknown","labels_url":"https://api.github.com/repos/dotnet/roslyn/milestones/2/labels","id":937398,"number":2,"title":"Unknown","description":"This represents work which is not planned for a specific release.\r\n\r\n<!---\r\n@huboard:{\"order\":0.25}\n-->\r\n","creator":{"login":"jaredpar","id":146967,"avatar_url":"https://avatars.githubusercontent.com/u/146967?v=3","gravatar_id":"","url":"https://api.github.com/users/jaredpar","html_url":"https://github.com/jaredpar","followers_url":"https://api.github.com/users/jaredpar/followers","following_url":"https://api.github.com/users/jaredpar/following{/other_user}","gists_url":"https://api.github.com/users/jaredpar/gists{/gist_id}","starred_url":"https://api.github.com/users/jaredpar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jaredpar/subscriptions","organizations_url":"https://api.github.com/users/jaredpar/orgs","repos_url":"https://api.github.com/users/jaredpar/repos","events_url":"https://api.github.com/users/jaredpar/events{/privacy}","received_events_url":"https://api.github.com/users/jaredpar/received_events","type":"User","site_admin":false},"open_issues":319,"closed_issues":69,"state":"open","created_at":"2015-01-15T20:46:02Z","updated_at":"2015-08-26T18:28:24Z","due_on":null,"closed_at":null},"comments":7,"created_at":"2015-01-15T02:48:13Z","updated_at":"2015-08-26T18:28:25Z","closed_at":"2015-08-26T18:28:24Z","body":"The human meaning of parameters may vary from method caller's perspective.\r\n\r\nIt would be useful if the language provides an ability to assign aliases to the parameters.\r\n\r\n```C#\r\n[Alias({second: [secondAndHalf, quarterToThree], first: [Initial]})] \r\npublic static void Member1(string first, string second) { \r\n  // Here the user will always use the given names: first and second.\r\n  // which means the user cannot use the param by its nickname\r\n  // inside the method scope.\r\n}\r\n\r\nprivate static void Caller1() {\r\n  Member1(secondAndHalf: \"secondly, this is not a bad idea after all\",\r\n          Initial: \"Initially it sounded moot... :)  \");\r\n}\r\n\r\nprivate static void Caller2() {\r\n  Member1(first: \"1st\",\r\n          quarterToThree: \"almost there\");\r\n}\r\n\r\nprivate static void Caller3() {\r\n  Member1(\"one\", \"two\");\r\n}\r\n```\r\n\r\nvs. this current approach:\r\n\r\n```c#\r\npublic static void Member1(string first, string second) {  }\r\n\r\npublic static void Member1(string first, string secondAndHalf, string devNull = null) { \r\n  Member1(first, secondAndHalf);\r\n}\r\n```\r\n\r\nNote: the parameter `devNull` may violate [CA1026](http://msdn.microsoft.com/en-us/library/ms182135.aspx), in case of `overridden` methods. On the flip side, setting `devNull` as non-default parameter would yield \"unused parameter\".\r\n\r\nRelated / Real world example: https://github.com/madskristensen/WebEssentials2013/pull/380#issuecomment-31402391"}}