{"action":"created","issue":{"url":"https://api.github.com/repos/rust-lang/rfcs/issues/1362","labels_url":"https://api.github.com/repos/rust-lang/rfcs/issues/1362/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/rfcs/issues/1362/comments","events_url":"https://api.github.com/repos/rust-lang/rfcs/issues/1362/events","html_url":"https://github.com/rust-lang/rfcs/issues/1362","id":116190286,"number":1362,"title":"Rust Needs The Ternary Conditional Operator (-?-:-)","user":{"login":"dangerrust","id":15785036,"avatar_url":"https://avatars.githubusercontent.com/u/15785036?v=3","gravatar_id":"","url":"https://api.github.com/users/dangerrust","html_url":"https://github.com/dangerrust","followers_url":"https://api.github.com/users/dangerrust/followers","following_url":"https://api.github.com/users/dangerrust/following{/other_user}","gists_url":"https://api.github.com/users/dangerrust/gists{/gist_id}","starred_url":"https://api.github.com/users/dangerrust/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dangerrust/subscriptions","organizations_url":"https://api.github.com/users/dangerrust/orgs","repos_url":"https://api.github.com/users/dangerrust/repos","events_url":"https://api.github.com/users/dangerrust/events{/privacy}","received_events_url":"https://api.github.com/users/dangerrust/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":14,"created_at":"2015-11-10T20:03:11Z","updated_at":"2015-11-13T03:56:52Z","closed_at":null,"body":"Hello,\r\n\r\nIt looks like Rust forgot to implement the ternary conditional operator\r\n\r\nIt's operator that looks like this: `condition ? trueExpression : falseExpression`\r\n\r\nThis important feature lets you do things like `return value == 5 ? success : failure;`\r\n\r\nWithout this Ternary Conditional Operator you must use if statements which make ugly duplicated code (leads to bugs)\r\n\r\nI think it easy to add support for this in Rust"},"comment":{"url":"https://api.github.com/repos/rust-lang/rfcs/issues/comments/156316201","html_url":"https://github.com/rust-lang/rfcs/issues/1362#issuecomment-156316201","issue_url":"https://api.github.com/repos/rust-lang/rfcs/issues/1362","id":156316201,"user":{"login":"installgen2","id":11202492,"avatar_url":"https://avatars.githubusercontent.com/u/11202492?v=3","gravatar_id":"","url":"https://api.github.com/users/installgen2","html_url":"https://github.com/installgen2","followers_url":"https://api.github.com/users/installgen2/followers","following_url":"https://api.github.com/users/installgen2/following{/other_user}","gists_url":"https://api.github.com/users/installgen2/gists{/gist_id}","starred_url":"https://api.github.com/users/installgen2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/installgen2/subscriptions","organizations_url":"https://api.github.com/users/installgen2/orgs","repos_url":"https://api.github.com/users/installgen2/repos","events_url":"https://api.github.com/users/installgen2/events{/privacy}","received_events_url":"https://api.github.com/users/installgen2/received_events","type":"User","site_admin":false},"created_at":"2015-11-13T03:56:52Z","updated_at":"2015-11-13T03:56:52Z","body":":+1: is practically essential in certain circumstances in order to keep code from turning ugly."}}