{"action":"created","issue":{"url":"https://api.github.com/repos/gluon-lang/gluon/issues/40","repository_url":"https://api.github.com/repos/gluon-lang/gluon","labels_url":"https://api.github.com/repos/gluon-lang/gluon/issues/40/labels{/name}","comments_url":"https://api.github.com/repos/gluon-lang/gluon/issues/40/comments","events_url":"https://api.github.com/repos/gluon-lang/gluon/issues/40/events","html_url":"https://github.com/gluon-lang/gluon/issues/40","id":165966479,"number":40,"title":"Allow type signatures to be placed above declarations, ala-Haskell","user":{"login":"brendanzab","id":695077,"avatar_url":"https://avatars3.githubusercontent.com/u/695077?v=4","gravatar_id":"","url":"https://api.github.com/users/brendanzab","html_url":"https://github.com/brendanzab","followers_url":"https://api.github.com/users/brendanzab/followers","following_url":"https://api.github.com/users/brendanzab/following{/other_user}","gists_url":"https://api.github.com/users/brendanzab/gists{/gist_id}","starred_url":"https://api.github.com/users/brendanzab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brendanzab/subscriptions","organizations_url":"https://api.github.com/users/brendanzab/orgs","repos_url":"https://api.github.com/users/brendanzab/repos","events_url":"https://api.github.com/users/brendanzab/events{/privacy}","received_events_url":"https://api.github.com/users/brendanzab/received_events","type":"User","site_admin":false},"labels":[{"id":420908902,"url":"https://api.github.com/repos/gluon-lang/gluon/labels/parser","name":"parser","color":"c2e0c6","default":false},{"id":244786780,"url":"https://api.github.com/repos/gluon-lang/gluon/labels/unresolved%20language%20question","name":"unresolved language question","color":"fbca04","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/gluon-lang/gluon/milestones/5","html_url":"https://github.com/gluon-lang/gluon/milestone/5","labels_url":"https://api.github.com/repos/gluon-lang/gluon/milestones/5/labels","id":2482841,"number":5,"title":"1.0.0","description":"Issues which must be resolved before gluon is ready for 1.0.0","creator":{"login":"Marwes","id":957312,"avatar_url":"https://avatars3.githubusercontent.com/u/957312?v=4","gravatar_id":"","url":"https://api.github.com/users/Marwes","html_url":"https://github.com/Marwes","followers_url":"https://api.github.com/users/Marwes/followers","following_url":"https://api.github.com/users/Marwes/following{/other_user}","gists_url":"https://api.github.com/users/Marwes/gists{/gist_id}","starred_url":"https://api.github.com/users/Marwes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Marwes/subscriptions","organizations_url":"https://api.github.com/users/Marwes/orgs","repos_url":"https://api.github.com/users/Marwes/repos","events_url":"https://api.github.com/users/Marwes/events{/privacy}","received_events_url":"https://api.github.com/users/Marwes/received_events","type":"User","site_admin":false},"open_issues":18,"closed_issues":8,"state":"open","created_at":"2017-04-26T08:51:43Z","updated_at":"2018-01-28T23:25:57Z","due_on":null,"closed_at":null},"comments":8,"created_at":"2016-07-17T08:15:52Z","updated_at":"2018-02-02T19:58:52Z","closed_at":null,"author_association":"MEMBER","body":"As [discussed on /r/rust](https://www.reddit.com/r/rust/comments/4snob4/gluon_a_static_type_inferred_and_embeddable/d5b7puv), I've always found that typed declarations in MLs get long fast. Leads to people writing code that relies too much on global type inference, and is therefore is hard to figure out later. :( \n\n``` elm\nlet my_long_function : LongType -> LongerType -> LongestType -> Return\n    my_long_function x y z = ...\n```\n"},"comment":{"url":"https://api.github.com/repos/gluon-lang/gluon/issues/comments/362690584","html_url":"https://github.com/gluon-lang/gluon/issues/40#issuecomment-362690584","issue_url":"https://api.github.com/repos/gluon-lang/gluon/issues/40","id":362690584,"user":{"login":"Marwes","id":957312,"avatar_url":"https://avatars3.githubusercontent.com/u/957312?v=4","gravatar_id":"","url":"https://api.github.com/users/Marwes","html_url":"https://github.com/Marwes","followers_url":"https://api.github.com/users/Marwes/followers","following_url":"https://api.github.com/users/Marwes/following{/other_user}","gists_url":"https://api.github.com/users/Marwes/gists{/gist_id}","starred_url":"https://api.github.com/users/Marwes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Marwes/subscriptions","organizations_url":"https://api.github.com/users/Marwes/orgs","repos_url":"https://api.github.com/users/Marwes/repos","events_url":"https://api.github.com/users/Marwes/events{/privacy}","received_events_url":"https://api.github.com/users/Marwes/received_events","type":"User","site_admin":false},"created_at":"2018-02-02T19:58:52Z","updated_at":"2018-02-02T19:58:52Z","author_association":"OWNER","body":"@OvermindDL1 \r\n\r\n> Inline arguments, this has the advantage of being able to only type what you need to and let the rest be inferred.\r\n\r\nGluon has an alternative approach here actually which also works well with separate type annotations. By writing `_` as the type we mark it as a \"hole\" which gets inferred. So `let f` == `let f : _`\r\n\r\n>But even then I tend to write the code first before the types, OCaml is fantastic about catching wrong code even with no type annotations, the compiler is always unambiguously right in OCaml (unlike GHC/Haskell). :-)\r\n\r\nDoes it handle the \"spooky type errors at a distance\" problems well? Often in heavily type inferred code I find that there is risk that the error happens in the wrong place (gluon has the beginnings of \"bi-directional type inference\" which should help with this somewhat)"}}
{"actor":{"display_login":"Marwes"}}