{"action":"created","issue":{"url":"https://api.github.com/repos/HaxeFoundation/haxe-evolution/issues/24","repository_url":"https://api.github.com/repos/HaxeFoundation/haxe-evolution","labels_url":"https://api.github.com/repos/HaxeFoundation/haxe-evolution/issues/24/labels{/name}","comments_url":"https://api.github.com/repos/HaxeFoundation/haxe-evolution/issues/24/comments","events_url":"https://api.github.com/repos/HaxeFoundation/haxe-evolution/issues/24/events","html_url":"https://github.com/HaxeFoundation/haxe-evolution/pull/24","id":243862895,"number":24,"title":"Module-level functions","user":{"login":"nadako","id":49749,"avatar_url":"https://avatars0.githubusercontent.com/u/49749?v=4","gravatar_id":"","url":"https://api.github.com/users/nadako","html_url":"https://github.com/nadako","followers_url":"https://api.github.com/users/nadako/followers","following_url":"https://api.github.com/users/nadako/following{/other_user}","gists_url":"https://api.github.com/users/nadako/gists{/gist_id}","starred_url":"https://api.github.com/users/nadako/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nadako/subscriptions","organizations_url":"https://api.github.com/users/nadako/orgs","repos_url":"https://api.github.com/users/nadako/repos","events_url":"https://api.github.com/users/nadako/events{/privacy}","received_events_url":"https://api.github.com/users/nadako/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":45,"created_at":"2017-07-18T21:53:00Z","updated_at":"2017-08-08T21:29:13Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/HaxeFoundation/haxe-evolution/pulls/24","html_url":"https://github.com/HaxeFoundation/haxe-evolution/pull/24","diff_url":"https://github.com/HaxeFoundation/haxe-evolution/pull/24.diff","patch_url":"https://github.com/HaxeFoundation/haxe-evolution/pull/24.patch"},"body":"Allow defining functions (and maybe vars) directly in .hx files instead of making a class with static methods.\r\n\r\n[Rendered version](https://github.com/nadako/haxe-evolution/blob/module_level_funcs/proposals/0000-module-level-funcs.md)"},"comment":{"url":"https://api.github.com/repos/HaxeFoundation/haxe-evolution/issues/comments/321087248","html_url":"https://github.com/HaxeFoundation/haxe-evolution/pull/24#issuecomment-321087248","issue_url":"https://api.github.com/repos/HaxeFoundation/haxe-evolution/issues/24","id":321087248,"user":{"login":"jdonaldson","id":41479,"avatar_url":"https://avatars2.githubusercontent.com/u/41479?v=4","gravatar_id":"","url":"https://api.github.com/users/jdonaldson","html_url":"https://github.com/jdonaldson","followers_url":"https://api.github.com/users/jdonaldson/followers","following_url":"https://api.github.com/users/jdonaldson/following{/other_user}","gists_url":"https://api.github.com/users/jdonaldson/gists{/gist_id}","starred_url":"https://api.github.com/users/jdonaldson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jdonaldson/subscriptions","organizations_url":"https://api.github.com/users/jdonaldson/orgs","repos_url":"https://api.github.com/users/jdonaldson/repos","events_url":"https://api.github.com/users/jdonaldson/events{/privacy}","received_events_url":"https://api.github.com/users/jdonaldson/received_events","type":"User","site_admin":false},"created_at":"2017-08-08T21:29:13Z","updated_at":"2017-08-08T21:29:13Z","body":"I'd be willing to do the work to support this for lua.  But, the way I see it I shouldn't have to do anything at all... so maybe I'm not getting the whole picture.\r\n\r\nIs it really necessary to define new AST nodes for this?  Why not just infer the class name from the file name, generate a wrapper class in the AST for it, and add special metadata to it to indicate that it behaves as a module level class.   Even for targets that have no notion of class, it will still be important to namespace the code so that methods and variables do not collide.   \"Pure\" module level functions won't really generate faster code either... most targets sensitive to this have flattened namespaces.\r\n\r\nAlso, can we reliably differentiate between class-level and field-level metadata for this?  Some metadata applies to both.\r\n\r\nAs a side note, it would be nice to handle non-oop class constructs with this (e.g. abstract/extern)"}}
{"actor":{"display_login":"jdonaldson"}}