{"action":"created","issue":{"url":"https://api.github.com/repos/crystal-lang/crystal/issues/1847","repository_url":"https://api.github.com/repos/crystal-lang/crystal","labels_url":"https://api.github.com/repos/crystal-lang/crystal/issues/1847/labels{/name}","comments_url":"https://api.github.com/repos/crystal-lang/crystal/issues/1847/comments","events_url":"https://api.github.com/repos/crystal-lang/crystal/issues/1847/events","html_url":"https://github.com/crystal-lang/crystal/issues/1847","id":114421071,"number":1847,"title":"Error messages should show Type|Nil instead of Type?","user":{"login":"RX14","id":2788811,"avatar_url":"https://avatars.githubusercontent.com/u/2788811?v=3","gravatar_id":"","url":"https://api.github.com/users/RX14","html_url":"https://github.com/RX14","followers_url":"https://api.github.com/users/RX14/followers","following_url":"https://api.github.com/users/RX14/following{/other_user}","gists_url":"https://api.github.com/users/RX14/gists{/gist_id}","starred_url":"https://api.github.com/users/RX14/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RX14/subscriptions","organizations_url":"https://api.github.com/users/RX14/orgs","repos_url":"https://api.github.com/users/RX14/repos","events_url":"https://api.github.com/users/RX14/events{/privacy}","received_events_url":"https://api.github.com/users/RX14/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/crystal-lang/crystal/labels/compiler","name":"compiler","color":"fef2c0"},{"url":"https://api.github.com/repos/crystal-lang/crystal/labels/draft","name":"draft","color":"00B8B8"},{"url":"https://api.github.com/repos/crystal-lang/crystal/labels/RFC","name":"RFC","color":"009800"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-10-31T16:56:37Z","updated_at":"2016-06-12T18:04:18Z","closed_at":null,"body":"I think that the more verbose `Type|Nil` syntax is better for error messages than the easilly misread `Type?`. Retain `Type?` as a shortcut in code, but I think `Type|Nil` is much clearer and visible in error messages."},"comment":{"url":"https://api.github.com/repos/crystal-lang/crystal/issues/comments/225451365","html_url":"https://github.com/crystal-lang/crystal/issues/1847#issuecomment-225451365","issue_url":"https://api.github.com/repos/crystal-lang/crystal/issues/1847","id":225451365,"user":{"login":"RX14","id":2788811,"avatar_url":"https://avatars.githubusercontent.com/u/2788811?v=3","gravatar_id":"","url":"https://api.github.com/users/RX14","html_url":"https://github.com/RX14","followers_url":"https://api.github.com/users/RX14/followers","following_url":"https://api.github.com/users/RX14/following{/other_user}","gists_url":"https://api.github.com/users/RX14/gists{/gist_id}","starred_url":"https://api.github.com/users/RX14/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RX14/subscriptions","organizations_url":"https://api.github.com/users/RX14/orgs","repos_url":"https://api.github.com/users/RX14/repos","events_url":"https://api.github.com/users/RX14/events{/privacy}","received_events_url":"https://api.github.com/users/RX14/received_events","type":"User","site_admin":false},"created_at":"2016-06-12T18:04:18Z","updated_at":"2016-06-12T18:04:18Z","body":"The point is that `Type?` is easily misread as `Type` in error messages, where `Type | Nil` is not. I would imagine the same applies for docs.\r\n\r\nIn code, I don't think it's as hard to misread somehow..."}}
{"actor":{"display_login":"RX14"}}