{"action":"created","issue":{"url":"https://api.github.com/repos/rust-lang/rfcs/issues/2544","repository_url":"https://api.github.com/repos/rust-lang/rfcs","labels_url":"https://api.github.com/repos/rust-lang/rfcs/issues/2544/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/rfcs/issues/2544/comments","events_url":"https://api.github.com/repos/rust-lang/rfcs/issues/2544/events","html_url":"https://github.com/rust-lang/rfcs/pull/2544","id":360899330,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE2MDA0MzU5","number":2544,"title":"Make the turbofish syntax redundant","user":{"login":"varkor","id":3943692,"node_id":"MDQ6VXNlcjM5NDM2OTI=","avatar_url":"https://avatars1.githubusercontent.com/u/3943692?v=4","gravatar_id":"","url":"https://api.github.com/users/varkor","html_url":"https://github.com/varkor","followers_url":"https://api.github.com/users/varkor/followers","following_url":"https://api.github.com/users/varkor/following{/other_user}","gists_url":"https://api.github.com/users/varkor/gists{/gist_id}","starred_url":"https://api.github.com/users/varkor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/varkor/subscriptions","organizations_url":"https://api.github.com/users/varkor/orgs","repos_url":"https://api.github.com/users/varkor/repos","events_url":"https://api.github.com/users/varkor/events{/privacy}","received_events_url":"https://api.github.com/users/varkor/received_events","type":"User","site_admin":false},"labels":[{"id":302201869,"node_id":"MDU6TGFiZWwzMDIyMDE4Njk=","url":"https://api.github.com/repos/rust-lang/rfcs/labels/I-nominated","name":"I-nominated","color":"e11d21","default":false},{"id":211667886,"node_id":"MDU6TGFiZWwyMTE2Njc4ODY=","url":"https://api.github.com/repos/rust-lang/rfcs/labels/T-lang","name":"T-lang","color":"bfd4f2","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":9,"created_at":"2018-09-17T14:35:42Z","updated_at":"2018-09-17T22:34:10Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/rust-lang/rfcs/pulls/2544","html_url":"https://github.com/rust-lang/rfcs/pull/2544","diff_url":"https://github.com/rust-lang/rfcs/pull/2544.diff","patch_url":"https://github.com/rust-lang/rfcs/pull/2544.patch"},"body":"Make disambiguating generic arguments in expressions with `::` optional, allowing generic arguments to be specified without `::`. This makes the \"turbofish\" notation no longer necessary.\r\n\r\n[Rendered](https://github.com/varkor/rfcs/blob/undisambiguated_generics/text/0000-undisambiguated-generics.md)\r\n\r\nThis makes the following valid syntax:\r\n```rust\r\nstruct Nooper<T>(T);\r\n\r\nimpl<T> Nooper<T> {\r\n    fn noop<U>(&self, _: U) {}\r\n}\r\n\r\nfn id<T>(t: T) -> T {\r\n    t\r\n}\r\n\r\nfn main() {\r\n    id<u32>(0u32); // ok\r\n    let n = Nooper<&str>(\":)\"); // ok\r\n    n.noop<()>(()); // ok\r\n}\r\n```\r\n\r\nThe syntax ambiguities `(a<b,c>(d))` and `a<b>>c` are resolved in favour of generic expressions.\r\n\r\n---\r\n\r\nThis is an updated and more considered version of the RFC put forward a little while ago.\r\nThanks to @Centril, @comex, @joshtriplett, @kennytm, @petrochenkov, @rpjohnst, @scottmcm, @ubsan and @xfix for their feedback (and everyone else who chipped in)!\r\n\r\ncc @aturon, @eddyb, @withoutboats"},"comment":{"url":"https://api.github.com/repos/rust-lang/rfcs/issues/comments/422193876","html_url":"https://github.com/rust-lang/rfcs/pull/2544#issuecomment-422193876","issue_url":"https://api.github.com/repos/rust-lang/rfcs/issues/2544","id":422193876,"node_id":"MDEyOklzc3VlQ29tbWVudDQyMjE5Mzg3Ng==","user":{"login":"dherman","id":307871,"node_id":"MDQ6VXNlcjMwNzg3MQ==","avatar_url":"https://avatars2.githubusercontent.com/u/307871?v=4","gravatar_id":"","url":"https://api.github.com/users/dherman","html_url":"https://github.com/dherman","followers_url":"https://api.github.com/users/dherman/followers","following_url":"https://api.github.com/users/dherman/following{/other_user}","gists_url":"https://api.github.com/users/dherman/gists{/gist_id}","starred_url":"https://api.github.com/users/dherman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dherman/subscriptions","organizations_url":"https://api.github.com/users/dherman/orgs","repos_url":"https://api.github.com/users/dherman/repos","events_url":"https://api.github.com/users/dherman/events{/privacy}","received_events_url":"https://api.github.com/users/dherman/received_events","type":"User","site_admin":false},"created_at":"2018-09-17T22:34:10Z","updated_at":"2018-09-17T22:34:10Z","author_association":"NONE","body":"@estebank I would say discoverability, guessability, and -- maybe the biggest issue to me -- every one-more-thing you have to explain risks being the one thing that blows a newcomer's cognitive budget. Don't get me wrong, overall I've been pleasantly surprised at how quickly my colleagues have gone from zero to productive users of Rust. But there are still so many little surprises in the onboarding experience, that it's easy for a learner to just blow their stack and give up. (I think I'm just basically giving an exegesis for why I'm so excited about all the effort Rust is putting into ergonomics, at least the learning side of it.)\r\n\r\n@SimonSapin My only point about JavaScript was that it shows us that it does in fact work in practice, at scale, to make _de facto_ compatible changes. JavaScript of course does not tell us what we _should_ do. From my perspective, doing it with language editions means we wait several years longer to solve a pain point simply because we have a mechanism that lets us do so, but that's obviously my biased by experiences I mentioned. Can you help me understand the rationale for why you wouldn't want to make the change now? Are you concerned about de facto risks that we haven't actually uncovered in our empirical investigations? Or is it an aesthetic about clarity of policy?"}}
{"actor":{"display_login":"dherman"}}