{"action":"created","issue":{"url":"https://api.github.com/repos/HaxeFoundation/haxe/issues/5895","repository_url":"https://api.github.com/repos/HaxeFoundation/haxe","labels_url":"https://api.github.com/repos/HaxeFoundation/haxe/issues/5895/labels{/name}","comments_url":"https://api.github.com/repos/HaxeFoundation/haxe/issues/5895/comments","events_url":"https://api.github.com/repos/HaxeFoundation/haxe/issues/5895/events","html_url":"https://github.com/HaxeFoundation/haxe/issues/5895","id":196646521,"number":5895,"title":"[std] Sys.getEnv() should accept a default value as optional parameter","user":{"login":"bschramke","id":930632,"avatar_url":"https://avatars.githubusercontent.com/u/930632?v=3","gravatar_id":"","url":"https://api.github.com/users/bschramke","html_url":"https://github.com/bschramke","followers_url":"https://api.github.com/users/bschramke/followers","following_url":"https://api.github.com/users/bschramke/following{/other_user}","gists_url":"https://api.github.com/users/bschramke/gists{/gist_id}","starred_url":"https://api.github.com/users/bschramke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bschramke/subscriptions","organizations_url":"https://api.github.com/users/bschramke/orgs","repos_url":"https://api.github.com/users/bschramke/repos","events_url":"https://api.github.com/users/bschramke/events{/privacy}","received_events_url":"https://api.github.com/users/bschramke/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-12-20T11:12:21Z","updated_at":"2016-12-21T17:23:52Z","closed_at":null,"body":"Currently Sys.getEnv() returns null if the requested environment variable was not found. With this you often have to write boilerplate like \r\n```\r\nvar v = Sys.getEnv(\"MY_VAR\");\r\nif (v == null) v = \"SomeDefaultValue\";\r\n//do something usefull with v\r\n```\r\nIf Sys.getEnv() would accept an default value as second optional param, this would reduce to \r\n```\r\nvar v = Sys.getEnv(\"MY_VAR\", \"SomeDefaultValue\");\r\n//do something usefull with v\r\n```\r\nI know this is not a big deal, but I think it would be a nice improvement."},"comment":{"url":"https://api.github.com/repos/HaxeFoundation/haxe/issues/comments/268582346","html_url":"https://github.com/HaxeFoundation/haxe/issues/5895#issuecomment-268582346","issue_url":"https://api.github.com/repos/HaxeFoundation/haxe/issues/5895","id":268582346,"user":{"login":"ncannasse","id":1022912,"avatar_url":"https://avatars.githubusercontent.com/u/1022912?v=3","gravatar_id":"","url":"https://api.github.com/users/ncannasse","html_url":"https://github.com/ncannasse","followers_url":"https://api.github.com/users/ncannasse/followers","following_url":"https://api.github.com/users/ncannasse/following{/other_user}","gists_url":"https://api.github.com/users/ncannasse/gists{/gist_id}","starred_url":"https://api.github.com/users/ncannasse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ncannasse/subscriptions","organizations_url":"https://api.github.com/users/ncannasse/orgs","repos_url":"https://api.github.com/users/ncannasse/repos","events_url":"https://api.github.com/users/ncannasse/events{/privacy}","received_events_url":"https://api.github.com/users/ncannasse/received_events","type":"User","site_admin":false},"created_at":"2016-12-21T17:23:52Z","updated_at":"2016-12-21T17:23:52Z","body":"It could be misleading and would require to change on all platforms, I think it's not necessary to have this changed."}}
{"actor":{"display_login":"ncannasse"}}