{"action":"created","issue":{"url":"https://api.github.com/repos/elm-lang/elm-compiler/issues/621","labels_url":"https://api.github.com/repos/elm-lang/elm-compiler/issues/621/labels{/name}","comments_url":"https://api.github.com/repos/elm-lang/elm-compiler/issues/621/comments","events_url":"https://api.github.com/repos/elm-lang/elm-compiler/issues/621/events","html_url":"https://github.com/elm-lang/elm-compiler/issues/621","id":32932343,"number":621,"title":"Feature: 'where' expressions","user":{"login":"jonashaag","id":175722,"avatar_url":"https://avatars.githubusercontent.com/u/175722?v=3","gravatar_id":"","url":"https://api.github.com/users/jonashaag","html_url":"https://github.com/jonashaag","followers_url":"https://api.github.com/users/jonashaag/followers","following_url":"https://api.github.com/users/jonashaag/following{/other_user}","gists_url":"https://api.github.com/users/jonashaag/gists{/gist_id}","starred_url":"https://api.github.com/users/jonashaag/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonashaag/subscriptions","organizations_url":"https://api.github.com/users/jonashaag/orgs","repos_url":"https://api.github.com/users/jonashaag/repos","events_url":"https://api.github.com/users/jonashaag/events{/privacy}","received_events_url":"https://api.github.com/users/jonashaag/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2014-05-06T20:59:25Z","updated_at":"2015-05-08T01:07:46Z","closed_at":"2015-05-08T01:07:46Z","body":"I'd love to see support for \"upside down\" `let ... in` expressions, like you have in Haskell:\r\n\r\n```hs\r\nspam = foo bar where\r\n  bar = ...\r\n```\r\n\r\nSometimes code is easier to read if you see the Big Picture first, with the details hidden. Having a Haskell background, I often find myself laying out new definitions by typing `let \\n in` first, leaving empty the `let` part, then sketching the Big Picture in the `in` part, and finally filling out all the details in the `let` part:\r\n\r\n```hs\r\nfoo = let\r\n      in\r\n\r\n==>\r\n\r\nfoo = let\r\n      in ... Big Picture ...\r\n\r\n==>\r\n\r\nfoo = let details\r\n      in ... Big Picture ...\r\n```\r\n\r\nI understand that 'where' expressions are a bit problematic because they flip the order in which code is executed (since Elm is eagerly evaluated, you'll have to evaluate the `where ...` block before evaluating the Big Picture expression). But I think this is something you can easily adapt your thinking to, so I wouldn't expect it to cause a lot of confusion."},"comment":{"url":"https://api.github.com/repos/elm-lang/elm-compiler/issues/comments/100058415","html_url":"https://github.com/elm-lang/elm-compiler/issues/621#issuecomment-100058415","issue_url":"https://api.github.com/repos/elm-lang/elm-compiler/issues/621","id":100058415,"user":{"login":"evancz","id":1658058,"avatar_url":"https://avatars.githubusercontent.com/u/1658058?v=3","gravatar_id":"","url":"https://api.github.com/users/evancz","html_url":"https://github.com/evancz","followers_url":"https://api.github.com/users/evancz/followers","following_url":"https://api.github.com/users/evancz/following{/other_user}","gists_url":"https://api.github.com/users/evancz/gists{/gist_id}","starred_url":"https://api.github.com/users/evancz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/evancz/subscriptions","organizations_url":"https://api.github.com/users/evancz/orgs","repos_url":"https://api.github.com/users/evancz/repos","events_url":"https://api.github.com/users/evancz/events{/privacy}","received_events_url":"https://api.github.com/users/evancz/received_events","type":"User","site_admin":false},"created_at":"2015-05-08T01:07:46Z","updated_at":"2015-05-08T01:07:46Z","body":"The current decision is to not support `where`. I want to avoid adding redundant syntax for the foreseeable future."}}