{"action":"created","issue":{"url":"https://api.github.com/repos/dotnet/roslyn/issues/2974","labels_url":"https://api.github.com/repos/dotnet/roslyn/issues/2974/labels{/name}","comments_url":"https://api.github.com/repos/dotnet/roslyn/issues/2974/comments","events_url":"https://api.github.com/repos/dotnet/roslyn/issues/2974/events","html_url":"https://github.com/dotnet/roslyn/issues/2974","id":79005330,"number":2974,"title":"C# structure isn't DRY","user":{"login":"breyed","id":1299073,"avatar_url":"https://avatars.githubusercontent.com/u/1299073?v=3","gravatar_id":"","url":"https://api.github.com/users/breyed","html_url":"https://github.com/breyed","followers_url":"https://api.github.com/users/breyed/followers","following_url":"https://api.github.com/users/breyed/following{/other_user}","gists_url":"https://api.github.com/users/breyed/gists{/gist_id}","starred_url":"https://api.github.com/users/breyed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/breyed/subscriptions","organizations_url":"https://api.github.com/users/breyed/orgs","repos_url":"https://api.github.com/users/breyed/repos","events_url":"https://api.github.com/users/breyed/events{/privacy}","received_events_url":"https://api.github.com/users/breyed/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"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":14,"created_at":"2015-05-21T13:56:15Z","updated_at":"2015-05-22T16:16:57Z","closed_at":null,"body":"In C#, the curly braces and indentation provide redundant ways to express the structure of namespaces, types, statement blocks, etc. Only the braces are normative, but if the indentation doesn't match, it confuses people. To compensate for the need to repeat ourselves, we use coding guidelines and tools to enforce the pairing.\r\n\r\nOf course the redundancy intentional, going way back to C. It allows unusual whitespace patterns for the rare circumstances where they are useful. Perhaps a whitespace-ignorant parser was simpler to write on the memory constrained computers of the 1960s.\r\n\r\nIn any case, the lack of DRYness is a design hole that - while consciously carried forward - is fixable. A great solution would be to take page out of F#'s book and retain the existing curly-brace syntax as the verbose syntax and introduce a new whitespace-based lightweight syntax."},"comment":{"url":"https://api.github.com/repos/dotnet/roslyn/issues/comments/104702309","html_url":"https://github.com/dotnet/roslyn/issues/2974#issuecomment-104702309","issue_url":"https://api.github.com/repos/dotnet/roslyn/issues/2974","id":104702309,"user":{"login":"whoisj","id":11578325,"avatar_url":"https://avatars.githubusercontent.com/u/11578325?v=3","gravatar_id":"","url":"https://api.github.com/users/whoisj","html_url":"https://github.com/whoisj","followers_url":"https://api.github.com/users/whoisj/followers","following_url":"https://api.github.com/users/whoisj/following{/other_user}","gists_url":"https://api.github.com/users/whoisj/gists{/gist_id}","starred_url":"https://api.github.com/users/whoisj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/whoisj/subscriptions","organizations_url":"https://api.github.com/users/whoisj/orgs","repos_url":"https://api.github.com/users/whoisj/repos","events_url":"https://api.github.com/users/whoisj/events{/privacy}","received_events_url":"https://api.github.com/users/whoisj/received_events","type":"User","site_admin":false},"created_at":"2015-05-22T16:16:57Z","updated_at":"2015-05-22T16:16:57Z","body":"@breyed in my examples, there's nothing \"unproductive\" about any of them. Simple tools like Astyle and complex IDEs like Visual Studio can be set to automatically format your code. Give the ease by which each developer can format code (so long as whitespace is a non-issue), I completely do not understand your logic.\r\n\r\nIf whitespace were difficult to manage or a requirement for doing work, I'd agree about your DRY concern. At no point do I feel that I am repeating myself when I code C# in Visual Studio. The IDE closes braces, formats indention and whitespace for me, and generally checks that code is compliant. I focus on the logic and flow while retaining a layout (whitespace, indention, etc) that is pleasing to me, requires minimal brain power to parse, and makes me more productive. YMMV"}}