{"action":"created","issue":{"url":"https://api.github.com/repos/dotnet/roslyn/issues/36","labels_url":"https://api.github.com/repos/dotnet/roslyn/issues/36/labels{/name}","comments_url":"https://api.github.com/repos/dotnet/roslyn/issues/36/comments","events_url":"https://api.github.com/repos/dotnet/roslyn/issues/36/events","html_url":"https://github.com/dotnet/roslyn/issues/36","id":54766173,"number":36,"title":"Allow support for params IEnumerable<T> methods","user":{"login":"mburbea","id":213233,"avatar_url":"https://avatars.githubusercontent.com/u/213233?v=3","gravatar_id":"","url":"https://api.github.com/users/mburbea","html_url":"https://github.com/mburbea","followers_url":"https://api.github.com/users/mburbea/followers","following_url":"https://api.github.com/users/mburbea/following{/other_user}","gists_url":"https://api.github.com/users/mburbea/gists{/gist_id}","starred_url":"https://api.github.com/users/mburbea/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mburbea/subscriptions","organizations_url":"https://api.github.com/users/mburbea/orgs","repos_url":"https://api.github.com/users/mburbea/repos","events_url":"https://api.github.com/users/mburbea/events{/privacy}","received_events_url":"https://api.github.com/users/mburbea/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/dotnet/roslyn/labels/Feature+Request","name":"Feature Request","color":"fc2929"},{"url":"https://api.github.com/repos/dotnet/roslyn/labels/Language-C%23","name":"Language-C#","color":"207de5"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":50,"created_at":"2015-01-19T13:53:21Z","updated_at":"2015-01-22T21:57:46Z","closed_at":null,"body":"Currently, C# only supports `params T[]`, however it is rare that I actually need an array for my method. More often than not, I merely want iteration or to perform some sort of LINQ operators against the parameter. In fact, it is common for libraries to declare a version of the method that takes an IEnumerable<T> and a T[], and have the T[] version call the IEnumerable<T> variant. \r\n\r\nThe implementation detail could still be that an array is made at the call site and sent to the method, the benefit is to simply avoid having to create the extra overload."},"comment":{"url":"https://api.github.com/repos/dotnet/roslyn/issues/comments/71107409","html_url":"https://github.com/dotnet/roslyn/issues/36#issuecomment-71107409","issue_url":"https://api.github.com/repos/dotnet/roslyn/issues/36","id":71107409,"user":{"login":"mikedn","id":9973420,"avatar_url":"https://avatars.githubusercontent.com/u/9973420?v=3","gravatar_id":"","url":"https://api.github.com/users/mikedn","html_url":"https://github.com/mikedn","followers_url":"https://api.github.com/users/mikedn/followers","following_url":"https://api.github.com/users/mikedn/following{/other_user}","gists_url":"https://api.github.com/users/mikedn/gists{/gist_id}","starred_url":"https://api.github.com/users/mikedn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikedn/subscriptions","organizations_url":"https://api.github.com/users/mikedn/orgs","repos_url":"https://api.github.com/users/mikedn/repos","events_url":"https://api.github.com/users/mikedn/events{/privacy}","received_events_url":"https://api.github.com/users/mikedn/received_events","type":"User","site_admin":false},"created_at":"2015-01-22T21:57:45Z","updated_at":"2015-01-22T21:57:45Z","body":"@HaloFour \r\n\r\nSo, because `TParams` is `struct` you'll get one native version for every TParams type that you are using, that can easily get out of hand. You don't know how big your Foo method will be in practice, maybe someone will write a 1000 lines method and want it to have `params`.\r\n\r\nAnonymous types have little code. In particular, the property getters are trivial and candidates for inlining. Additionally, anonymous types fulfill a certain practical need but your proposition doesn't do that. It's an attempt at optimization that risks being a deoptimization if the code gets large."}}