{"action":"created","issue":{"url":"https://api.github.com/repos/crystal-lang/crystal/issues/1348","repository_url":"https://api.github.com/repos/crystal-lang/crystal","labels_url":"https://api.github.com/repos/crystal-lang/crystal/issues/1348/labels{/name}","comments_url":"https://api.github.com/repos/crystal-lang/crystal/issues/1348/comments","events_url":"https://api.github.com/repos/crystal-lang/crystal/issues/1348/events","html_url":"https://github.com/crystal-lang/crystal/issues/1348","id":104373342,"number":1348,"title":"[RFC] Alias for Slice(UInt8)","user":{"login":"technorama","id":51043,"avatar_url":"https://avatars.githubusercontent.com/u/51043?v=3","gravatar_id":"","url":"https://api.github.com/users/technorama","html_url":"https://github.com/technorama","followers_url":"https://api.github.com/users/technorama/followers","following_url":"https://api.github.com/users/technorama/following{/other_user}","gists_url":"https://api.github.com/users/technorama/gists{/gist_id}","starred_url":"https://api.github.com/users/technorama/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/technorama/subscriptions","organizations_url":"https://api.github.com/users/technorama/orgs","repos_url":"https://api.github.com/users/technorama/repos","events_url":"https://api.github.com/users/technorama/events{/privacy}","received_events_url":"https://api.github.com/users/technorama/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/crystal-lang/crystal/labels/accepted","name":"accepted","color":"00B85C"},{"url":"https://api.github.com/repos/crystal-lang/crystal/labels/RFC","name":"RFC","color":"009800"},{"url":"https://api.github.com/repos/crystal-lang/crystal/labels/standard%20library","name":"standard library","color":"fad8c7"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2015-09-01T23:21:43Z","updated_at":"2016-06-09T07:07:09Z","closed_at":null,"body":"Can an alias of Slice(UInt8) be added to reduce carpel tunnel?\r\n\r\nSuggestions:\r\n* Bytes\r\n* Buffer\r\n"},"comment":{"url":"https://api.github.com/repos/crystal-lang/crystal/issues/comments/224816708","html_url":"https://github.com/crystal-lang/crystal/issues/1348#issuecomment-224816708","issue_url":"https://api.github.com/repos/crystal-lang/crystal/issues/1348","id":224816708,"user":{"login":"pkorotkov","id":532567,"avatar_url":"https://avatars.githubusercontent.com/u/532567?v=3","gravatar_id":"","url":"https://api.github.com/users/pkorotkov","html_url":"https://github.com/pkorotkov","followers_url":"https://api.github.com/users/pkorotkov/followers","following_url":"https://api.github.com/users/pkorotkov/following{/other_user}","gists_url":"https://api.github.com/users/pkorotkov/gists{/gist_id}","starred_url":"https://api.github.com/users/pkorotkov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pkorotkov/subscriptions","organizations_url":"https://api.github.com/users/pkorotkov/orgs","repos_url":"https://api.github.com/users/pkorotkov/repos","events_url":"https://api.github.com/users/pkorotkov/events{/privacy}","received_events_url":"https://api.github.com/users/pkorotkov/received_events","type":"User","site_admin":false},"created_at":"2016-06-09T07:07:09Z","updated_at":"2016-06-09T07:07:09Z","body":"I believe that adding an alias for only Bytes [here](https://github.com/crystal-lang/crystal/issues/2776) is an incomplete solution. It'd be more consistent and elegant to introduce\r\n```crystal\r\nalias Byte = UInt8\r\nalias Bytes = Slice(Byte)\r\nalias Chars = Slice(Char)\r\n```\r\nto make it possible to rewrite methods like IO#read_byte, IO#write_byte in a unified way\r\n```\r\n#read_byte: Byte | Nil (counterpart of #read_char : Char | Nil)\r\n#write_byte(byte : Byte)\r\n```"}}
{"actor":{"display_login":"pkorotkov"}}