{"action":"created","issue":{"url":"https://api.github.com/repos/elm-lang/elm-compiler/issues/1460","repository_url":"https://api.github.com/repos/elm-lang/elm-compiler","labels_url":"https://api.github.com/repos/elm-lang/elm-compiler/issues/1460/labels{/name}","comments_url":"https://api.github.com/repos/elm-lang/elm-compiler/issues/1460/comments","events_url":"https://api.github.com/repos/elm-lang/elm-compiler/issues/1460/events","html_url":"https://github.com/elm-lang/elm-compiler/issues/1460","id":170228489,"number":1460,"title":"Proposal: Newline as optional separator for lists / records","user":{"login":"kspeakman","id":4582668,"avatar_url":"https://avatars.githubusercontent.com/u/4582668?v=3","gravatar_id":"","url":"https://api.github.com/users/kspeakman","html_url":"https://github.com/kspeakman","followers_url":"https://api.github.com/users/kspeakman/followers","following_url":"https://api.github.com/users/kspeakman/following{/other_user}","gists_url":"https://api.github.com/users/kspeakman/gists{/gist_id}","starred_url":"https://api.github.com/users/kspeakman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kspeakman/subscriptions","organizations_url":"https://api.github.com/users/kspeakman/orgs","repos_url":"https://api.github.com/users/kspeakman/repos","events_url":"https://api.github.com/users/kspeakman/events{/privacy}","received_events_url":"https://api.github.com/users/kspeakman/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-08-09T17:48:08Z","updated_at":"2016-08-09T18:11:20Z","closed_at":"2016-08-09T18:06:50Z","body":"This is similar to #978 without going quite as far.\r\n\r\nThe compiler should allow newlines to serve as the separator in lists and records.\r\n\r\nExample:\r\n\r\n```\r\ntype alias Model = \r\n  { viewMode     : ViewMode\r\n    docs         : List Doc\r\n    currentDocId : Maybe Identifier\r\n    currentDoc   : Doc\r\n  }\r\n```\r\n\r\nThe newlines divide the visual structure of this code for the programmer, not the commas. This is statement of fact... test it by trying to use the commas without newlines. It's a jumble past a certain size. Example:\r\n\r\n`type alias Model =  { viewMode: ViewMode, docs: List Doc, currentDocId: Maybe Identifier, currentDoc: Doc }`\r\n\r\n(Wrapping occurs above, not an intentional newline.)\r\n\r\nAdding a comma in cases where a newline is also used may be your preference, but it is superfluous to the more important concept of organizing the code with newlines.\r\n\r\n```\r\ntype alias Model = \r\n  { viewMode     : ViewMode\r\n  , docs         : List Doc\r\n  , currentDocId : Maybe Identifier\r\n  , currentDoc   : Doc\r\n  }\r\n```\r\n\r\nBeing an optional feature would allow those who like the explicit separators to continue to use them, and the change would be backwards compatible with existing code.\r\n\r\nMy experience with this issue: I've used both methods in F#. Initially, I only used the default separator (semi-colon) for lists and records in F#. Later, I started using newlines-as-separators for those structures where they were multi-line. My experience is that the latter makes the code less fiddly to change and more readable for fresh eyes."},"comment":{"url":"https://api.github.com/repos/elm-lang/elm-compiler/issues/comments/238640628","html_url":"https://github.com/elm-lang/elm-compiler/issues/1460#issuecomment-238640628","issue_url":"https://api.github.com/repos/elm-lang/elm-compiler/issues/1460","id":238640628,"user":{"login":"kspeakman","id":4582668,"avatar_url":"https://avatars.githubusercontent.com/u/4582668?v=3","gravatar_id":"","url":"https://api.github.com/users/kspeakman","html_url":"https://github.com/kspeakman","followers_url":"https://api.github.com/users/kspeakman/followers","following_url":"https://api.github.com/users/kspeakman/following{/other_user}","gists_url":"https://api.github.com/users/kspeakman/gists{/gist_id}","starred_url":"https://api.github.com/users/kspeakman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kspeakman/subscriptions","organizations_url":"https://api.github.com/users/kspeakman/orgs","repos_url":"https://api.github.com/users/kspeakman/repos","events_url":"https://api.github.com/users/kspeakman/events{/privacy}","received_events_url":"https://api.github.com/users/kspeakman/received_events","type":"User","site_admin":false},"created_at":"2016-08-09T18:11:20Z","updated_at":"2016-08-09T18:11:20Z","body":"Round-filed. Gotcha. Thanks for the response."}}
{"actor":{"display_login":"kspeakman"}}