{"action":"opened","issue":{"url":"https://api.github.com/repos/baronfel/issueTestRepo/issues/130","repository_url":"https://api.github.com/repos/baronfel/issueTestRepo","labels_url":"https://api.github.com/repos/baronfel/issueTestRepo/issues/130/labels{/name}","comments_url":"https://api.github.com/repos/baronfel/issueTestRepo/issues/130/comments","events_url":"https://api.github.com/repos/baronfel/issueTestRepo/issues/130/events","html_url":"https://github.com/baronfel/issueTestRepo/issues/130","id":183116177,"number":130,"title":"Relax indentation rules on Records","user":{"login":"baronfel","id":573979,"avatar_url":"https://avatars.githubusercontent.com/u/573979?v=3","gravatar_id":"","url":"https://api.github.com/users/baronfel","html_url":"https://github.com/baronfel","followers_url":"https://api.github.com/users/baronfel/followers","following_url":"https://api.github.com/users/baronfel/following{/other_user}","gists_url":"https://api.github.com/users/baronfel/gists{/gist_id}","starred_url":"https://api.github.com/users/baronfel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/baronfel/subscriptions","organizations_url":"https://api.github.com/users/baronfel/orgs","repos_url":"https://api.github.com/users/baronfel/repos","events_url":"https://api.github.com/users/baronfel/events{/privacy}","received_events_url":"https://api.github.com/users/baronfel/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/baronfel/issueTestRepo/labels/votes:1-10","name":"votes:1-10","color":"ededed"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-10-14T18:12:42Z","updated_at":"2016-10-14T18:12:42Z","closed_at":null,"body":"# Relax indentation rules on Records [15696774] #\n\n**Submitted by Mathias Brandewinder on 8/17/2016 12:00:00 AM**  \n**9 votes on UserVoice prior to migration**  \n\nThe current indentation rules around records seem inconsistent, or at least counter-intuitive. Consider for instance:\r\ntype Foo = {\r\n....Foo:int\r\n....}\r\ntype Bar = {\r\n....F:Foo\r\n....}\r\nlet bar = {\r\n....F = {\r\n........Foo = 10\r\n........}\r\n....}\r\nThis is valid. But if you change F in Bar to VeryLongName:\r\ntype Baz = {\r\n....VeryLongName:Foo\r\n....}\r\nlet baz = {\r\n....VeryLongName = {\r\n........Foo = 10\r\n........}\r\n....}\r\nWe now get a warning:\r\nwarning FS0058: Possible incorrect indentation: this token is offside of context started at position (10:20). Try indenting this token further or using standard formatting conventions.\r\nIn a similar fashion, indentation rules around adding members to records seem inconsistent, or at least counter-intuitive.\r\nThe 2 examples below are valid:\r\ntype Foo1 =\r\n....{\r\n........data:int\r\n....}\r\n....member x.Data = x.data\r\ntype Foo2 = {\r\n....data:int\r\n....}\r\n....with member x.Data = x.data\r\n... but this one is not:\r\ntype Foo3 = {\r\n....data:int\r\n....}\r\n....member x.Data = x.data\r\nThere is a workaround - systematically put the opening brace { on the second line - but the \"shorter\" syntax is quite nice, and allows to write compact and readable code. Given what is currently acceptable syntax, relaxing a bit the rules would be quite nice, and follow the principle of 'least surprise'.\r\nNote: this is loosely related to [/archive/suggestion-9156844-relax-some-of-the-indentation-rules](/archive/suggestion-9156844-relax-some-of-the-indentation-rules.md) ; that specific problem is brought up in the comments.\r\nNote: sorry about the .... but this is the only way I could find to keep the code indentation preserved.\n\n\n\n**[Original UserVoice Submission](https://fslang.uservoice.com/245727-f-language/suggestions/15696774)**\n[Archived Uservoice Comments](../tree/master/archive/suggestion-15696774-relax-indentation-rules-on-records.md#comments)\n"}}
{"actor":{"display_login":"baronfel"}}