{"action":"created","issue":{"url":"https://api.github.com/repos/rust-lang/rfcs/issues/1303","labels_url":"https://api.github.com/repos/rust-lang/rfcs/issues/1303/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/rfcs/issues/1303/comments","events_url":"https://api.github.com/repos/rust-lang/rfcs/issues/1303/events","html_url":"https://github.com/rust-lang/rfcs/pull/1303","id":109424677,"number":1303,"title":"Add a `let...else` expression, similar to Swift's `guard let...else`","user":{"login":"mbrubeck","id":5920,"avatar_url":"https://avatars.githubusercontent.com/u/5920?v=3","gravatar_id":"","url":"https://api.github.com/users/mbrubeck","html_url":"https://github.com/mbrubeck","followers_url":"https://api.github.com/users/mbrubeck/followers","following_url":"https://api.github.com/users/mbrubeck/following{/other_user}","gists_url":"https://api.github.com/users/mbrubeck/gists{/gist_id}","starred_url":"https://api.github.com/users/mbrubeck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbrubeck/subscriptions","organizations_url":"https://api.github.com/users/mbrubeck/orgs","repos_url":"https://api.github.com/users/mbrubeck/repos","events_url":"https://api.github.com/users/mbrubeck/events{/privacy}","received_events_url":"https://api.github.com/users/mbrubeck/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":88,"created_at":"2015-10-02T03:43:46Z","updated_at":"2015-10-04T15:04:38Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/rust-lang/rfcs/pulls/1303","html_url":"https://github.com/rust-lang/rfcs/pull/1303","diff_url":"https://github.com/rust-lang/rfcs/pull/1303.diff","patch_url":"https://github.com/rust-lang/rfcs/pull/1303.patch"},"body":"[Rendered](https://github.com/mbrubeck/rfcs/blob/if-not-let/text/0000-let-else.md)\r\n\r\n**Note:** The initial version of this RFC used the syntax `if !let PAT = EXPR { BODY }`.  In the current version this has been changed to `let PAT = EXPR else { BODY }` for reasons discussed below."},"comment":{"url":"https://api.github.com/repos/rust-lang/rfcs/issues/comments/145356420","html_url":"https://github.com/rust-lang/rfcs/pull/1303#issuecomment-145356420","issue_url":"https://api.github.com/repos/rust-lang/rfcs/issues/1303","id":145356420,"user":{"login":"Ericson2314","id":1055245,"avatar_url":"https://avatars.githubusercontent.com/u/1055245?v=3","gravatar_id":"","url":"https://api.github.com/users/Ericson2314","html_url":"https://github.com/Ericson2314","followers_url":"https://api.github.com/users/Ericson2314/followers","following_url":"https://api.github.com/users/Ericson2314/following{/other_user}","gists_url":"https://api.github.com/users/Ericson2314/gists{/gist_id}","starred_url":"https://api.github.com/users/Ericson2314/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ericson2314/subscriptions","organizations_url":"https://api.github.com/users/Ericson2314/orgs","repos_url":"https://api.github.com/users/Ericson2314/repos","events_url":"https://api.github.com/users/Ericson2314/events{/privacy}","received_events_url":"https://api.github.com/users/Ericson2314/received_events","type":"User","site_admin":false},"created_at":"2015-10-04T15:04:38Z","updated_at":"2015-10-04T15:04:38Z","body":"@glaebhoerl I agree adding such simple sugar is comparatively harmless, but as you hint at, there kind of indefinite new control structures one can come up with. So it seems like a bit of a slippery sloop. Now I like these better than if-let for actually having a somewhat interesting desugar, but rather than just taking it as a given that \"macros aren't nice enough\" I think all this should motivate us to make a better macro system, or at least deprecate extra syntaxes from here on out (if only if-let too) once we have one.\r\n\r\nIf we are going to add control structures to the language, I rather add something very low level to match the MIR ...like goto."}}