{"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"},{"url":"https://api.github.com/repos/dotnet/roslyn/labels/Discussion","name":"Discussion","color":"fbca04"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/dotnet/roslyn/milestones/2","html_url":"https://github.com/dotnet/roslyn/milestones/Unknown","labels_url":"https://api.github.com/repos/dotnet/roslyn/milestones/2/labels","id":937398,"number":2,"title":"Unknown","description":"This represents work which is not planned for a specific release.\r\n\r\n<!---\r\n@huboard:{\"order\":0.25}\n-->\r\n","creator":{"login":"jaredpar","id":146967,"avatar_url":"https://avatars.githubusercontent.com/u/146967?v=3","gravatar_id":"","url":"https://api.github.com/users/jaredpar","html_url":"https://github.com/jaredpar","followers_url":"https://api.github.com/users/jaredpar/followers","following_url":"https://api.github.com/users/jaredpar/following{/other_user}","gists_url":"https://api.github.com/users/jaredpar/gists{/gist_id}","starred_url":"https://api.github.com/users/jaredpar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jaredpar/subscriptions","organizations_url":"https://api.github.com/users/jaredpar/orgs","repos_url":"https://api.github.com/users/jaredpar/repos","events_url":"https://api.github.com/users/jaredpar/events{/privacy}","received_events_url":"https://api.github.com/users/jaredpar/received_events","type":"User","site_admin":false},"open_issues":268,"closed_issues":55,"state":"open","created_at":"2015-01-15T20:46:02Z","updated_at":"2015-05-29T14:50:44Z","due_on":null,"closed_at":null},"comments":27,"created_at":"2015-05-21T13:56:15Z","updated_at":"2015-05-29T18:59:24Z","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/106903884","html_url":"https://github.com/dotnet/roslyn/issues/2974#issuecomment-106903884","issue_url":"https://api.github.com/repos/dotnet/roslyn/issues/2974","id":106903884,"user":{"login":"GeirGrusom","id":4979268,"avatar_url":"https://avatars.githubusercontent.com/u/4979268?v=3","gravatar_id":"","url":"https://api.github.com/users/GeirGrusom","html_url":"https://github.com/GeirGrusom","followers_url":"https://api.github.com/users/GeirGrusom/followers","following_url":"https://api.github.com/users/GeirGrusom/following{/other_user}","gists_url":"https://api.github.com/users/GeirGrusom/gists{/gist_id}","starred_url":"https://api.github.com/users/GeirGrusom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GeirGrusom/subscriptions","organizations_url":"https://api.github.com/users/GeirGrusom/orgs","repos_url":"https://api.github.com/users/GeirGrusom/repos","events_url":"https://api.github.com/users/GeirGrusom/events{/privacy}","received_events_url":"https://api.github.com/users/GeirGrusom/received_events","type":"User","site_admin":false},"created_at":"2015-05-29T18:59:24Z","updated_at":"2015-05-29T18:59:24Z","body":"Razor can just convert everything between `@(` and `)`, @{ and } without caring about white space at all. The expressions inside, is verbatim valid C#. With a white space aware language it's not that simple any more.\r\n\r\nI would also like to mention that mixing tabs and spaces, or getting the number of spaces wrong, either by copy-paste or poor merge conflict resolution, can introduce bugs in the code if C# cares about white space. And the benefit is non-existent in my opinion.\r\n\r\nPython, OCaml and F# all care about white space, and I would say in F# it's an annoyance, and it's one of the least noticeable features of Python. So why bother implementing it in C#?\r\n\r\nAlso imagine if C cared about white space. We would never have had [The International Obfuscated C Code Contest](http://www.ioccc.org/)!"}}