{"action":"created","issue":{"url":"https://api.github.com/repos/dotnet/roslyn/issues/6135","labels_url":"https://api.github.com/repos/dotnet/roslyn/issues/6135/labels{/name}","comments_url":"https://api.github.com/repos/dotnet/roslyn/issues/6135/comments","events_url":"https://api.github.com/repos/dotnet/roslyn/issues/6135/events","html_url":"https://github.com/dotnet/roslyn/issues/6135","id":112066377,"number":6135,"title":"Proposal: Always allow omission of braces for single line statements (try, catch, finally, property, get, set, etc.)","user":{"login":"weitzhandler","id":2716316,"avatar_url":"https://avatars.githubusercontent.com/u/2716316?v=3","gravatar_id":"","url":"https://api.github.com/users/weitzhandler","html_url":"https://github.com/weitzhandler","followers_url":"https://api.github.com/users/weitzhandler/followers","following_url":"https://api.github.com/users/weitzhandler/following{/other_user}","gists_url":"https://api.github.com/users/weitzhandler/gists{/gist_id}","starred_url":"https://api.github.com/users/weitzhandler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/weitzhandler/subscriptions","organizations_url":"https://api.github.com/users/weitzhandler/orgs","repos_url":"https://api.github.com/users/weitzhandler/repos","events_url":"https://api.github.com/users/weitzhandler/events{/privacy}","received_events_url":"https://api.github.com/users/weitzhandler/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/dotnet/roslyn/labels/Area-Language%20Design","name":"Area-Language Design","color":"5319e7"},{"url":"https://api.github.com/repos/dotnet/roslyn/labels/Resolution-Won't%20Fix","name":"Resolution-Won't Fix","color":"cccccc"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":12,"created_at":"2015-10-19T03:48:59Z","updated_at":"2016-01-02T15:37:18Z","closed_at":"2015-12-31T01:10:57Z","body":"Instead of:\r\n\r\n    try\r\n    {\r\n      Run();\r\n    }\r\n    catch (Exception e)\r\n    {\r\n      Log(e);\r\n    }\r\n    finally\r\n    {\r\n      Close();\r\n    }\r\n\r\nThis should be allowed:\r\n\r\n    try\r\n      Run();\r\n    catch (Exception e)\r\n      Log(e);\r\n    finally\r\n      Close();\r\n\r\nLikewise,\r\n\r\n    public string MainPhone\r\n    {\r\n      get\r\n      {\r\n        return Phones.FirstOrDefault()?.Number;\r\n      }\r\n      set\r\n      {\r\n        SetPhone(index: 0, number: value);\r\n      }\r\n    }\r\n\r\nWould be much more readable as:\r\n\r\n    public string MainPhone\r\n      get\r\n        return Phones.FirstOrDefault()?.Number;\r\n      set\r\n        SetPhone(index: 0, number: value);\r\n\r\nIs there any problem with it?\r\nCurrently if an opening curly brace is not following the `try` or `catch` keywords it's a compile error.\r\n\r\nI think `try`-`catch` is the only block that doesn't support inline statements. Am I wrong?"},"comment":{"url":"https://api.github.com/repos/dotnet/roslyn/issues/comments/168400902","html_url":"https://github.com/dotnet/roslyn/issues/6135#issuecomment-168400902","issue_url":"https://api.github.com/repos/dotnet/roslyn/issues/6135","id":168400902,"user":{"login":"paulomorgado","id":470455,"avatar_url":"https://avatars.githubusercontent.com/u/470455?v=3","gravatar_id":"","url":"https://api.github.com/users/paulomorgado","html_url":"https://github.com/paulomorgado","followers_url":"https://api.github.com/users/paulomorgado/followers","following_url":"https://api.github.com/users/paulomorgado/following{/other_user}","gists_url":"https://api.github.com/users/paulomorgado/gists{/gist_id}","starred_url":"https://api.github.com/users/paulomorgado/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paulomorgado/subscriptions","organizations_url":"https://api.github.com/users/paulomorgado/orgs","repos_url":"https://api.github.com/users/paulomorgado/repos","events_url":"https://api.github.com/users/paulomorgado/events{/privacy}","received_events_url":"https://api.github.com/users/paulomorgado/received_events","type":"User","site_admin":false},"created_at":"2016-01-02T15:37:18Z","updated_at":"2016-01-02T15:37:18Z","body":"I hope Heck freezes and stay froze forever.\r\n\r\nThere are horror stories out there for C-like languages that allow block and single statements. C# did very well by not allowing that for new features."}}