{"action":"created","issue":{"url":"https://api.github.com/repos/HaxeFoundation/haxe/issues/4316","labels_url":"https://api.github.com/repos/HaxeFoundation/haxe/issues/4316/labels{/name}","comments_url":"https://api.github.com/repos/HaxeFoundation/haxe/issues/4316/comments","events_url":"https://api.github.com/repos/HaxeFoundation/haxe/issues/4316/events","html_url":"https://github.com/HaxeFoundation/haxe/pull/4316","id":87442470,"number":4316,"title":"Use abstract instead of typedef for `Null<T>`","user":{"login":"Simn","id":634365,"avatar_url":"https://avatars.githubusercontent.com/u/634365?v=3","gravatar_id":"","url":"https://api.github.com/users/Simn","html_url":"https://github.com/Simn","followers_url":"https://api.github.com/users/Simn/followers","following_url":"https://api.github.com/users/Simn/following{/other_user}","gists_url":"https://api.github.com/users/Simn/gists{/gist_id}","starred_url":"https://api.github.com/users/Simn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Simn/subscriptions","organizations_url":"https://api.github.com/users/Simn/orgs","repos_url":"https://api.github.com/users/Simn/repos","events_url":"https://api.github.com/users/Simn/events{/privacy}","received_events_url":"https://api.github.com/users/Simn/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":38,"created_at":"2015-06-11T18:38:07Z","updated_at":"2015-06-15T08:43:59Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/HaxeFoundation/haxe/pulls/4316","html_url":"https://github.com/HaxeFoundation/haxe/pull/4316","diff_url":"https://github.com/HaxeFoundation/haxe/pull/4316.diff","patch_url":"https://github.com/HaxeFoundation/haxe/pull/4316.patch"},"body":"For the most part this changes some TType to TAbstract and moves match cases around where necessary. There are a few special cases in type.ml to retain the current behavior and not break anything.\r\n\r\nThe idea is this:\r\n1. Merge this and stabilize it (now).\r\n2. Add a compiler flag to remove the `to T` from `Null<T>` and provide some sort of `.force():T` field (for 3.3.0).\r\n3. Get rid of the special cases that allow e.g. variance of `Array<Int>` and `Array<Null<Int>>` (for Haxe 4.0.0).\r\n\r\nThis PR might break macros that check for TType(\"Null\") right now. However, we have plenty of time to communicate that before the next release so it shouldn't be a problem.\r\n\r\n@ncannasse: If you have any reservations about doing this please speak up now. I would like to merge this really soon because it's quite merge-conflict-vulnerable."},"comment":{"url":"https://api.github.com/repos/HaxeFoundation/haxe/issues/comments/111980949","html_url":"https://github.com/HaxeFoundation/haxe/pull/4316#issuecomment-111980949","issue_url":"https://api.github.com/repos/HaxeFoundation/haxe/issues/4316","id":111980949,"user":{"login":"sledorze","id":416760,"avatar_url":"https://avatars.githubusercontent.com/u/416760?v=3","gravatar_id":"","url":"https://api.github.com/users/sledorze","html_url":"https://github.com/sledorze","followers_url":"https://api.github.com/users/sledorze/followers","following_url":"https://api.github.com/users/sledorze/following{/other_user}","gists_url":"https://api.github.com/users/sledorze/gists{/gist_id}","starred_url":"https://api.github.com/users/sledorze/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sledorze/subscriptions","organizations_url":"https://api.github.com/users/sledorze/orgs","repos_url":"https://api.github.com/users/sledorze/repos","events_url":"https://api.github.com/users/sledorze/events{/privacy}","received_events_url":"https://api.github.com/users/sledorze/received_events","type":"User","site_admin":false},"created_at":"2015-06-15T08:43:59Z","updated_at":"2015-06-15T08:43:59Z","body":"@ncannasse Everybody agrees that more typesafety (and more uncorrect program rejected) implies that some implicitly correct program can also be rejected.\r\n\r\nIt's an acceptable tradeoff that the developper has to explicitly force the compiler not to reject unprovably correct code.\r\n\r\nThe added benefit is that it will be easier to maintain as the code exhibit this intend and everyone will have a greater confidence into their program behaviour when no such intend are used.\r\n"}}