{"action":"created","issue":{"url":"https://api.github.com/repos/HaxeFoundation/haxe-evolution/issues/8","repository_url":"https://api.github.com/repos/HaxeFoundation/haxe-evolution","labels_url":"https://api.github.com/repos/HaxeFoundation/haxe-evolution/issues/8/labels{/name}","comments_url":"https://api.github.com/repos/HaxeFoundation/haxe-evolution/issues/8/comments","events_url":"https://api.github.com/repos/HaxeFoundation/haxe-evolution/issues/8/events","html_url":"https://github.com/HaxeFoundation/haxe-evolution/pull/8","id":182229028,"number":8,"title":"Arrow functions","user":{"login":"RealyUniqueName","id":3155708,"avatar_url":"https://avatars.githubusercontent.com/u/3155708?v=3","gravatar_id":"","url":"https://api.github.com/users/RealyUniqueName","html_url":"https://github.com/RealyUniqueName","followers_url":"https://api.github.com/users/RealyUniqueName/followers","following_url":"https://api.github.com/users/RealyUniqueName/following{/other_user}","gists_url":"https://api.github.com/users/RealyUniqueName/gists{/gist_id}","starred_url":"https://api.github.com/users/RealyUniqueName/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RealyUniqueName/subscriptions","organizations_url":"https://api.github.com/users/RealyUniqueName/orgs","repos_url":"https://api.github.com/users/RealyUniqueName/repos","events_url":"https://api.github.com/users/RealyUniqueName/events{/privacy}","received_events_url":"https://api.github.com/users/RealyUniqueName/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":37,"created_at":"2016-10-11T10:28:29Z","updated_at":"2016-11-07T22:04:45Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/HaxeFoundation/haxe-evolution/pulls/8","html_url":"https://github.com/HaxeFoundation/haxe-evolution/pull/8","diff_url":"https://github.com/HaxeFoundation/haxe-evolution/pull/8.diff","patch_url":"https://github.com/HaxeFoundation/haxe-evolution/pull/8.patch"},"body":"This proposes better syntax for anonymous functions for the sake of cleaner and easier to maintan code\n\n[Rendered version](https://github.com/RealyUniqueName/haxe-evolution/blob/master/proposals/0000-arrow-functions.md)\n"},"comment":{"url":"https://api.github.com/repos/HaxeFoundation/haxe-evolution/issues/comments/258977866","html_url":"https://github.com/HaxeFoundation/haxe-evolution/pull/8#issuecomment-258977866","issue_url":"https://api.github.com/repos/HaxeFoundation/haxe-evolution/issues/8","id":258977866,"user":{"login":"montibbalt","id":2214489,"avatar_url":"https://avatars.githubusercontent.com/u/2214489?v=3","gravatar_id":"","url":"https://api.github.com/users/montibbalt","html_url":"https://github.com/montibbalt","followers_url":"https://api.github.com/users/montibbalt/followers","following_url":"https://api.github.com/users/montibbalt/following{/other_user}","gists_url":"https://api.github.com/users/montibbalt/gists{/gist_id}","starred_url":"https://api.github.com/users/montibbalt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/montibbalt/subscriptions","organizations_url":"https://api.github.com/users/montibbalt/orgs","repos_url":"https://api.github.com/users/montibbalt/repos","events_url":"https://api.github.com/users/montibbalt/events{/privacy}","received_events_url":"https://api.github.com/users/montibbalt/received_events","type":"User","site_admin":false},"created_at":"2016-11-07T22:04:45Z","updated_at":"2016-11-07T22:04:45Z","body":"We've used short lambdas _extensively_ via a build macro for a few years now and ultimately we had to add support for type annotations by borrowing the type checking syntax. We don't use annotations in the vast majority of cases (I'd guess >98%), but they can be very helpful when necessary. Haxe's type inference can easily get confused and broken on things that have an inheritance hierarchy for example, like the Flash display list, and having the type annotation provides a nice hint to the compiler.  \r\nHere's a few examples of our existing syntax:\r\nStandard short lambda: ``x => x``\r\nLambda with type annotation: ``(x:Foo) => x``\r\nCurried lambda: ``x => y => x + y``\r\nMulti-argument lambda: ``[x, y] => x + y``\r\nMulti-argument lambda with one argument annotated and curly braces:\r\n```\r\n[(x:Foo), y] => {  \r\n    var z = getSomething();  \r\n    x + y + z;  \r\n}\r\n```"}}
{"actor":{"display_login":"montibbalt"}}