{"action":"created","issue":{"url":"https://api.github.com/repos/EdutainmentLIVE/haskell-style-guide/issues/21","repository_url":"https://api.github.com/repos/EdutainmentLIVE/haskell-style-guide","labels_url":"https://api.github.com/repos/EdutainmentLIVE/haskell-style-guide/issues/21/labels{/name}","comments_url":"https://api.github.com/repos/EdutainmentLIVE/haskell-style-guide/issues/21/comments","events_url":"https://api.github.com/repos/EdutainmentLIVE/haskell-style-guide/issues/21/events","html_url":"https://github.com/EdutainmentLIVE/haskell-style-guide/issues/21","id":315301175,"number":21,"title":"Avoid unnecessary eta reduction","user":{"login":"tfausak","id":408753,"avatar_url":"https://avatars1.githubusercontent.com/u/408753?v=4","gravatar_id":"","url":"https://api.github.com/users/tfausak","html_url":"https://github.com/tfausak","followers_url":"https://api.github.com/users/tfausak/followers","following_url":"https://api.github.com/users/tfausak/following{/other_user}","gists_url":"https://api.github.com/users/tfausak/gists{/gist_id}","starred_url":"https://api.github.com/users/tfausak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tfausak/subscriptions","organizations_url":"https://api.github.com/users/tfausak/orgs","repos_url":"https://api.github.com/users/tfausak/repos","events_url":"https://api.github.com/users/tfausak/events{/privacy}","received_events_url":"https://api.github.com/users/tfausak/received_events","type":"User","site_admin":false},"labels":[{"id":890374410,"url":"https://api.github.com/repos/EdutainmentLIVE/haskell-style-guide/labels/enhancement","name":"enhancement","color":"a2eeef","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-04-18T01:56:10Z","updated_at":"2018-05-08T20:26:06Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"In other words: Avoid golfing code via point free expressions.\r\n\r\n``` hs\r\n-- bad\r\n((. f) . compare .)\r\n\r\n-- good\r\n\\x y -> compare (f x) (f y)\r\n```\r\n\r\nIn general, top level declarations should list all of their arguments. Regular expressions can avoid listing their arguments if they're simple, like operator sections. Any time you have to reach for `flip`, `fmap fmap`, or [pointfree.io](http://pointfree.io), you should probably stop and use a lambda instead. \r\n\r\nhttps://wiki.haskell.org/Pointfree"},"comment":{"url":"https://api.github.com/repos/EdutainmentLIVE/haskell-style-guide/issues/comments/387531408","html_url":"https://github.com/EdutainmentLIVE/haskell-style-guide/issues/21#issuecomment-387531408","issue_url":"https://api.github.com/repos/EdutainmentLIVE/haskell-style-guide/issues/21","id":387531408,"user":{"login":"qxjit","id":7833,"avatar_url":"https://avatars1.githubusercontent.com/u/7833?v=4","gravatar_id":"","url":"https://api.github.com/users/qxjit","html_url":"https://github.com/qxjit","followers_url":"https://api.github.com/users/qxjit/followers","following_url":"https://api.github.com/users/qxjit/following{/other_user}","gists_url":"https://api.github.com/users/qxjit/gists{/gist_id}","starred_url":"https://api.github.com/users/qxjit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/qxjit/subscriptions","organizations_url":"https://api.github.com/users/qxjit/orgs","repos_url":"https://api.github.com/users/qxjit/repos","events_url":"https://api.github.com/users/qxjit/events{/privacy}","received_events_url":"https://api.github.com/users/qxjit/received_events","type":"User","site_admin":false},"created_at":"2018-05-08T20:26:06Z","updated_at":"2018-05-08T20:26:06Z","author_association":"NONE","body":"I agree with the sentiment that we should not commit contortions to the code in the same of golfing to point free-end ness. On the other hand, I *do* think we should promote higher level thinking where leaving out parameters makes sense because you're actually operating mentally on the functions themselves, rather than the parameters of those functions.\r\n\r\nIn all such cases though, they resulting function should be perfectly understandable and readable. If it expressing the parameters is what makes it so, then the parameters should be expressed."}}
{"actor":{"display_login":"qxjit"}}