{"action":"created","issue":{"url":"https://api.github.com/repos/dotnet/csharplang/issues/945","repository_url":"https://api.github.com/repos/dotnet/csharplang","labels_url":"https://api.github.com/repos/dotnet/csharplang/issues/945/labels{/name}","comments_url":"https://api.github.com/repos/dotnet/csharplang/issues/945/comments","events_url":"https://api.github.com/repos/dotnet/csharplang/issues/945/events","html_url":"https://github.com/dotnet/csharplang/issues/945","id":261450636,"number":945,"title":"Champion: by value vs `in` overload tiebreaker","user":{"login":"gafter","id":3804346,"avatar_url":"https://avatars3.githubusercontent.com/u/3804346?v=4","gravatar_id":"","url":"https://api.github.com/users/gafter","html_url":"https://github.com/gafter","followers_url":"https://api.github.com/users/gafter/followers","following_url":"https://api.github.com/users/gafter/following{/other_user}","gists_url":"https://api.github.com/users/gafter/gists{/gist_id}","starred_url":"https://api.github.com/users/gafter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gafter/subscriptions","organizations_url":"https://api.github.com/users/gafter/orgs","repos_url":"https://api.github.com/users/gafter/repos","events_url":"https://api.github.com/users/gafter/events{/privacy}","received_events_url":"https://api.github.com/users/gafter/received_events","type":"User","site_admin":false},"labels":[{"id":513192173,"url":"https://api.github.com/repos/dotnet/csharplang/labels/Proposal","name":"Proposal","color":"fbca04","default":false},{"id":536034773,"url":"https://api.github.com/repos/dotnet/csharplang/labels/Proposal%20champion","name":"Proposal champion","color":"fef2c0","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/dotnet/csharplang/milestones/11","html_url":"https://github.com/dotnet/csharplang/milestone/11","labels_url":"https://api.github.com/repos/dotnet/csharplang/milestones/11/labels","id":2807834,"number":11,"title":"7.3 candidate","description":"","creator":{"login":"MadsTorgersen","id":6677272,"avatar_url":"https://avatars2.githubusercontent.com/u/6677272?v=4","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},"open_issues":11,"closed_issues":1,"state":"open","created_at":"2017-10-02T17:05:04Z","updated_at":"2017-10-25T19:43:47Z","due_on":"2073-01-01T08:00:00Z","closed_at":null},"comments":16,"created_at":"2017-09-28T20:28:54Z","updated_at":"2017-10-29T21:04:20Z","closed_at":null,"author_association":"MEMBER","body":"- [ ] Proposal added\r\n- [X] Discussed in LDM\r\n- [ ] Decision in LDM\r\n- [ ] Finalized (done, rejected, inactive)\r\n- [ ] Spec'ed\r\n\r\nBased on a suggestion by the LDM, we propose to add the following overload resolution tiebreaker in some future version of C#.\r\n\r\nTwo applicable methods can have identical parameter types, but differ in argument ref kind. This can occur when the ref kind of one is by value, but the other is `in`. For example, for the methods\r\n``` c#\r\nvoid M(in int x) {}\r\nvoid M(int y) {}\r\n```\r\n\r\nThese would be ambiguous at the call site\r\n``` c#\r\nM(expr);\r\n```\r\n\r\nWe propose a new tie-breaker as follows:\r\n- If the expression is an lvalue, we bind to the overload with an `in` parameter.\r\n- Otherwise, we bind to the overload with a value parameter.\r\n\r\nBecause it is not clear how valuable this tie-breaker would be, we are deferring it to some future time when we can judge the impact of ambiguities of this sort.\r\n\r\nIn the meantime, users can explicitly select the desired overload by using a named argument, an explicit `in` at the callsite, or by changing the declarations of the methods to be sufficiently different.\r\n"},"comment":{"url":"https://api.github.com/repos/dotnet/csharplang/issues/comments/340295478","html_url":"https://github.com/dotnet/csharplang/issues/945#issuecomment-340295478","issue_url":"https://api.github.com/repos/dotnet/csharplang/issues/945","id":340295478,"user":{"login":"Joe4evr","id":1058562,"avatar_url":"https://avatars3.githubusercontent.com/u/1058562?v=4","gravatar_id":"","url":"https://api.github.com/users/Joe4evr","html_url":"https://github.com/Joe4evr","followers_url":"https://api.github.com/users/Joe4evr/followers","following_url":"https://api.github.com/users/Joe4evr/following{/other_user}","gists_url":"https://api.github.com/users/Joe4evr/gists{/gist_id}","starred_url":"https://api.github.com/users/Joe4evr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Joe4evr/subscriptions","organizations_url":"https://api.github.com/users/Joe4evr/orgs","repos_url":"https://api.github.com/users/Joe4evr/repos","events_url":"https://api.github.com/users/Joe4evr/events{/privacy}","received_events_url":"https://api.github.com/users/Joe4evr/received_events","type":"User","site_admin":false},"created_at":"2017-10-29T21:04:20Z","updated_at":"2017-10-29T21:04:20Z","author_association":"NONE","body":"> the semantics do not differ for most purposes except for code bases that traffic in a dangerous combination of mutation and concurrency\r\n\r\nWhich is exactly something I'd be worried about (despite knowing full-well that mutation+concurrency is a recipe for disaster - it's when other (mostly new) devs *don't* know that they're in some hot water that's worrying). You're talking about pushing a potentially API breaking change *through a language update*. I don't see that going over very well."}}
{"actor":{"display_login":"Joe4evr"}}