{"action":"created","issue":{"url":"https://api.github.com/repos/HaxeFoundation/hxcpp/issues/377","repository_url":"https://api.github.com/repos/HaxeFoundation/hxcpp","labels_url":"https://api.github.com/repos/HaxeFoundation/hxcpp/issues/377/labels{/name}","comments_url":"https://api.github.com/repos/HaxeFoundation/hxcpp/issues/377/comments","events_url":"https://api.github.com/repos/HaxeFoundation/hxcpp/issues/377/events","html_url":"https://github.com/HaxeFoundation/hxcpp/issues/377","id":134774826,"number":377,"title":"Don't pass null() into optional parameters","user":{"login":"tienery","id":2475112,"avatar_url":"https://avatars.githubusercontent.com/u/2475112?v=3","gravatar_id":"","url":"https://api.github.com/users/tienery","html_url":"https://github.com/tienery","followers_url":"https://api.github.com/users/tienery/followers","following_url":"https://api.github.com/users/tienery/following{/other_user}","gists_url":"https://api.github.com/users/tienery/gists{/gist_id}","starred_url":"https://api.github.com/users/tienery/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tienery/subscriptions","organizations_url":"https://api.github.com/users/tienery/orgs","repos_url":"https://api.github.com/users/tienery/repos","events_url":"https://api.github.com/users/tienery/events{/privacy}","received_events_url":"https://api.github.com/users/tienery/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":13,"created_at":"2016-02-19T05:21:15Z","updated_at":"2016-04-26T05:15:24Z","closed_at":"2016-04-26T05:15:24Z","body":"I have an instance in my code where the following extern:\r\n\r\n    @:native(\"sf::CircleShape\") public static function create(radius:Float, ?pointCount:UInt = 30):CircleShape;\r\n\r\nAnd the implementation:\r\n\r\n    var circle = CircleShape.create(50);\r\n\r\nGenerates the following code in output:\r\n\r\n    sf::CircleShape& tmp7 = sf::CircleShape((int)50,null());\r\n\r\nWhich gives unwanted results. This supposedly is caused by the fact that I'm using an extern class instead of a normal Haxe class, but it would be nice if it also applied to externs as well if at all possible."},"comment":{"url":"https://api.github.com/repos/HaxeFoundation/hxcpp/issues/comments/214618436","html_url":"https://github.com/HaxeFoundation/hxcpp/issues/377#issuecomment-214618436","issue_url":"https://api.github.com/repos/HaxeFoundation/hxcpp/issues/377","id":214618436,"user":{"login":"hughsando","id":1665494,"avatar_url":"https://avatars.githubusercontent.com/u/1665494?v=3","gravatar_id":"","url":"https://api.github.com/users/hughsando","html_url":"https://github.com/hughsando","followers_url":"https://api.github.com/users/hughsando/followers","following_url":"https://api.github.com/users/hughsando/following{/other_user}","gists_url":"https://api.github.com/users/hughsando/gists{/gist_id}","starred_url":"https://api.github.com/users/hughsando/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hughsando/subscriptions","organizations_url":"https://api.github.com/users/hughsando/orgs","repos_url":"https://api.github.com/users/hughsando/repos","events_url":"https://api.github.com/users/hughsando/events{/privacy}","received_events_url":"https://api.github.com/users/hughsando/received_events","type":"User","site_admin":false},"created_at":"2016-04-26T05:15:24Z","updated_at":"2016-04-26T05:15:24Z","body":"I'm combining this issue with https://github.com/HaxeFoundation/haxe/issues/3955 since this fix will come from changes to the haxe compiler.\r\n\r\nI the case were you can't represent the default value in haxe (eg, Renderstates &) then the overload option is certainly what you are after, since it will work efficiently and well."}}