GitHub PullRequestEvent at 2014-05-03 15:25:19
Repository: rfcs
Actor: pcwalton
Payload: {"action":"opened","number":64,"pull_request":{"url":"https://api.github.com/repos/rust-lang/rfcs/pulls/64","id":15463434,"html_url":"https://github.com/rust-lang/rfcs/pull/64","diff_url":"https://github.com/rust-lang/rfcs/pull/64.diff","patch_url":"https://github.com/rust-lang/rfcs/pull/64.patch","issue_url":"https://api.github.com/repos/rust-lang/rfcs/issues/64","number":64,"state":"open","title":"RFC: Longer numeric types (`u8` to `uint8`, etc.)","user":{"login":"pcwalton","id":157897,"avatar_url":"https://avatars.githubusercontent.com/u/157897?","gravatar_id":"eb3ddcfd60478e22ac5196f800fecf48","url":"https://api.github.com/users/pcwalton","html_url":"https://github.com/pcwalton","followers_url":"https://api.github.com/users/pcwalton/followers","following_url":"https://api.github.com/users/pcwalton/following{/other_user}","gists_url":"https://api.github.com/users/pcwalton/gists{/gist_id}","starred_url":"https://api.github.com/users/pcwalton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pcwalton/subscriptions","organizations_url":"https://api.github.com/users/pcwalton/orgs","repos_url":"https://api.github.com/users/pcwalton/repos","events_url":"https://api.github.com/users/pcwalton/events{/privacy}","received_events_url":"https://api.github.com/users/pcwalton/received_events","type":"User","site_admin":false},"body":"- Start Date: 2014-05-03\r\n- RFC PR #: (leave this empty)\r\n- Rust Issue #: (leave this empty)\r\n\r\n# Summary\r\n\r\nRename `i8`, `u16`, `f32`, etc. to `int8`, `uint16`, `float32`, etc., respectively.\r\n\r\n# Motivation\r\n\r\nThe goal of this change is to make Rust types adhere more closely to established standards (especially those of C99), and to increase consistency and readability.\r\n\r\nWe have a type `int`, but an 8-bit integer is not `int8` but rather `i8`. The abbrevation of \"integer\" is not consistent between these two names.\r\n\r\nType names like `u8` are commonly used in the Linux kernel, but are rare elsewhere. The use of `u8` in the Linux kernel predates the introduction of `stdint.h`, and it is not clear that Linux would have chosen this name if `stdint.h` had existed at the time.\r\n\r\n`uint64` has many more hits on Google than `u64`, as Go, C#, js-ctypes, Matlab, Vala, Pascal, and JNI. just to name a few off the first couple of search results, all use that name.\r\n\r\nEven more oddly, we actually have `uint8_t` and friends inside the `libc` crate, and code that uses the FFI is usually a mishmash of the `libc` types (e.g. `uint8_t`) and the built-in types (e.g. `u8`). The distinction is jarring.\r\n\r\n# Drawbacks\r\n\r\nThe disadvantages are that `uint8` is longer (although this can also be seen as an advantage, depending on your point of view), and that `u8` is consistent with the literal form (`1u8`).\r\n\r\n# Detailed design\r\n\r\nWe change:\r\n\r\n* `i8` to `int8`;\r\n* `i16` to `int16`;\r\n* `i32` to `int32`;\r\n* `i64` to `int64`;\r\n* `u8` to `uint8`;\r\n* `u16` to `uint16`;\r\n* `u32` to `uint32`;\r\n* `u64` to `uint64`;\r\n* `f32` to `float32`;\r\n* `f64` to `float64`;\r\n* `f128` to `float128`.\r\n\r\n# Alternatives\r\n\r\nThe impact of not doing this would be that Rust would continue to look the way it is, with the drawbacks and advantages noted above.\r\n\r\n# Unresolved questions\r\n\r\nNone.","created_at":"2014-05-03T15:25:19Z","updated_at":"2014-05-03T15:25:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/rust-lang/rfcs/pulls/64/commits","review_comments_url":"https://api.github.com/repos/rust-lang/rfcs/pulls/64/comments","review_comment_url":"https://api.github.com/repos/rust-lang/rfcs/pulls/comments/{number}","comments_url":"https://api.github.com/repos/rust-lang/rfcs/issues/64/comments","statuses_url":"https://api.github.com/repos/rust-lang/rfcs/statuses/b43102121ecf7c8ab11237dd3b065291a0bf5b6a","head":{"label":"pcwalton:longer-numeric-types","ref":"longer-numeric-types","sha":"b43102121ecf7c8ab11237dd3b065291a0bf5b6a","user":{"login":"pcwalton","id":157897,"avatar_url":"https://avatars.githubusercontent.com/u/157897?","gravatar_id":"eb3ddcfd60478e22ac5196f800fecf48","url":"https://api.github.com/users/pcwalton","html_url":"https://github.com/pcwalton","followers_url":"https://api.github.com/users/pcwalton/followers","following_url":"https://api.github.com/users/pcwalton/following{/other_user}","gists_url":"https://api.github.com/users/pcwalton/gists{/gist_id}","starred_url":"https://api.github.com/users/pcwalton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pcwalton/subscriptions","organizations_url":"https://api.github.com/users/pcwalton/orgs","repos_url":"https://api.github.com/users/pcwalton/repos","events_url":"https://api.github.com/users/pcwalton/events{/privacy}","received_events_url":"https://api.github.com/users/pcwalton/received_events","type":"User","site_admin":false},"repo":{"id":18920411,"name":"rfcs","full_name":"pcwalton/rfcs","owner":{"login":"pcwalton","id":157897,"avatar_url":"https://avatars.githubusercontent.com/u/157897?","gravatar_id":"eb3ddcfd60478e22ac5196f800fecf48","url":"https://api.github.com/users/pcwalton","html_url":"https://github.com/pcwalton","followers_url":"https://api.github.com/users/pcwalton/followers","following_url":"https://api.github.com/users/pcwalton/following{/other_user}","gists_url":"https://api.github.com/users/pcwalton/gists{/gist_id}","starred_url":"https://api.github.com/users/pcwalton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pcwalton/subscriptions","organizations_url":"https://api.github.com/users/pcwalton/orgs","repos_url":"https://api.github.com/users/pcwalton/repos","events_url":"https://api.github.com/users/pcwalton/events{/privacy}","received_events_url":"https://api.github.com/users/pcwalton/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/pcwalton/rfcs","description":"RFCs for changes to Rust","fork":true,"url":"https://api.github.com/repos/pcwalton/rfcs","forks_url":"https://api.github.com/repos/pcwalton/rfcs/forks","keys_url":"https://api.github.com/repos/pcwalton/rfcs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pcwalton/rfcs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pcwalton/rfcs/teams","hooks_url":"https://api.github.com/repos/pcwalton/rfcs/hooks","issue_events_url":"https://api.github.com/repos/pcwalton/rfcs/issues/events{/number}","events_url":"https://api.github.com/repos/pcwalton/rfcs/events","assignees_url":"https://api.github.com/repos/pcwalton/rfcs/assignees{/user}","branches_url":"https://api.github.com/repos/pcwalton/rfcs/branches{/branch}","tags_url":"https://api.github.com/repos/pcwalton/rfcs/tags","blobs_url":"https://api.github.com/repos/pcwalton/rfcs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pcwalton/rfcs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pcwalton/rfcs/git/refs{/sha}","trees_url":"https://api.github.com/repos/pcwalton/rfcs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pcwalton/rfcs/statuses/{sha}","languages_url":"https://api.github.com/repos/pcwalton/rfcs/languages","stargazers_url":"https://api.github.com/repos/pcwalton/rfcs/stargazers","contributors_url":"https://api.github.com/repos/pcwalton/rfcs/contributors","subscribers_url":"https://api.github.com/repos/pcwalton/rfcs/subscribers","subscription_url":"https://api.github.com/repos/pcwalton/rfcs/subscription","commits_url":"https://api.github.com/repos/pcwalton/rfcs/commits{/sha}","git_commits_url":"https://api.github.com/repos/pcwalton/rfcs/git/commits{/sha}","comments_url":"https://api.github.com/repos/pcwalton/rfcs/comments{/number}","issue_comment_url":"https://api.github.com/repos/pcwalton/rfcs/issues/comments/{number}","contents_url":"https://api.github.com/repos/pcwalton/rfcs/contents/{+path}","compare_url":"https://api.github.com/repos/pcwalton/rfcs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pcwalton/rfcs/merges","archive_url":"https://api.github.com/repos/pcwalton/rfcs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pcwalton/rfcs/downloads","issues_url":"https://api.github.com/repos/pcwalton/rfcs/issues{/number}","pulls_url":"https://api.github.com/repos/pcwalton/rfcs/pulls{/number}","milestones_url":"https://api.github.com/repos/pcwalton/rfcs/milestones{/number}","notifications_url":"https://api.github.com/repos/pcwalton/rfcs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pcwalton/rfcs/labels{/name}","releases_url":"https://api.github.com/repos/pcwalton/rfcs/releases{/id}","created_at":"2014-04-18T17:43:23Z","updated_at":"2014-05-03T15:25:19Z","pushed_at":"2014-05-03T15:24:46Z","git_url":"git://github.com/pcwalton/rfcs.git","ssh_url":"git@github.com:pcwalton/rfcs.git","clone_url":"https://github.com/pcwalton/rfcs.git","svn_url":"https://github.com/pcwalton/rfcs","homepage":"","size":238,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_downloads":true,"has_wiki":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"rust-lang:master","ref":"master","sha":"5e28254863f1ba93df6584380403257b3c646923","user":{"login":"rust-lang","id":5430905,"avatar_url":"https://avatars.githubusercontent.com/u/5430905?","gravatar_id":"a4268b59e433144466a0f67cbcfd8cdc","url":"https://api.github.com/users/rust-lang","html_url":"https://github.com/rust-lang","followers_url":"https://api.github.com/users/rust-lang/followers","following_url":"https://api.github.com/users/rust-lang/following{/other_user}","gists_url":"https://api.github.com/users/rust-lang/gists{/gist_id}","starred_url":"https://api.github.com/users/rust-lang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rust-lang/subscriptions","organizations_url":"https://api.github.com/users/rust-lang/orgs","repos_url":"https://api.github.com/users/rust-lang/repos","events_url":"https://api.github.com/users/rust-lang/events{/privacy}","received_events_url":"https://api.github.com/users/rust-lang/received_events","type":"Organization","site_admin":false},"repo":{"id":17527989,"name":"rfcs","full_name":"rust-lang/rfcs","owner":{"login":"rust-lang","id":5430905,"avatar_url":"https://avatars.githubusercontent.com/u/5430905?","gravatar_id":"a4268b59e433144466a0f67cbcfd8cdc","url":"https://api.github.com/users/rust-lang","html_url":"https://github.com/rust-lang","followers_url":"https://api.github.com/users/rust-lang/followers","following_url":"https://api.github.com/users/rust-lang/following{/other_user}","gists_url":"https://api.github.com/users/rust-lang/gists{/gist_id}","starred_url":"https://api.github.com/users/rust-lang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rust-lang/subscriptions","organizations_url":"https://api.github.com/users/rust-lang/orgs","repos_url":"https://api.github.com/users/rust-lang/repos","events_url":"https://api.github.com/users/rust-lang/events{/privacy}","received_events_url":"https://api.github.com/users/rust-lang/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rust-lang/rfcs","description":"RFCs for changes to Rust","fork":false,"url":"https://api.github.com/repos/rust-lang/rfcs","forks_url":"https://api.github.com/repos/rust-lang/rfcs/forks","keys_url":"https://api.github.com/repos/rust-lang/rfcs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rust-lang/rfcs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rust-lang/rfcs/teams","hooks_url":"https://api.github.com/repos/rust-lang/rfcs/hooks","issue_events_url":"https://api.github.com/repos/rust-lang/rfcs/issues/events{/number}","events_url":"https://api.github.com/repos/rust-lang/rfcs/events","assignees_url":"https://api.github.com/repos/rust-lang/rfcs/assignees{/user}","branches_url":"https://api.github.com/repos/rust-lang/rfcs/branches{/branch}","tags_url":"https://api.github.com/repos/rust-lang/rfcs/tags","blobs_url":"https://api.github.com/repos/rust-lang/rfcs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rust-lang/rfcs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rust-lang/rfcs/git/refs{/sha}","trees_url":"https://api.github.com/repos/rust-lang/rfcs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rust-lang/rfcs/statuses/{sha}","languages_url":"https://api.github.com/repos/rust-lang/rfcs/languages","stargazers_url":"https://api.github.com/repos/rust-lang/rfcs/stargazers","contributors_url":"https://api.github.com/repos/rust-lang/rfcs/contributors","subscribers_url":"https://api.github.com/repos/rust-lang/rfcs/subscribers","subscription_url":"https://api.github.com/repos/rust-lang/rfcs/subscription","commits_url":"https://api.github.com/repos/rust-lang/rfcs/commits{/sha}","git_commits_url":"https://api.github.com/repos/rust-lang/rfcs/git/commits{/sha}","comments_url":"https://api.github.com/repos/rust-lang/rfcs/comments{/number}","issue_comment_url":"https://api.github.com/repos/rust-lang/rfcs/issues/comments/{number}","contents_url":"https://api.github.com/repos/rust-lang/rfcs/contents/{+path}","compare_url":"https://api.github.com/repos/rust-lang/rfcs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rust-lang/rfcs/merges","archive_url":"https://api.github.com/repos/rust-lang/rfcs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rust-lang/rfcs/downloads","issues_url":"https://api.github.com/repos/rust-lang/rfcs/issues{/number}","pulls_url":"https://api.github.com/repos/rust-lang/rfcs/pulls{/number}","milestones_url":"https://api.github.com/repos/rust-lang/rfcs/milestones{/number}","notifications_url":"https://api.github.com/repos/rust-lang/rfcs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rust-lang/rfcs/labels{/name}","releases_url":"https://api.github.com/repos/rust-lang/rfcs/releases{/id}","created_at":"2014-03-07T21:29:00Z","updated_at":"2014-05-02T20:10:50Z","pushed_at":"2014-05-02T02:04:30Z","git_url":"git://github.com/rust-lang/rfcs.git","ssh_url":"git@github.com:rust-lang/rfcs.git","clone_url":"https://github.com/rust-lang/rfcs.git","svn_url":"https://github.com/rust-lang/rfcs","homepage":"","size":1394,"stargazers_count":43,"watchers_count":43,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":39,"mirror_url":null,"open_issues_count":39,"forks":39,"open_issues":39,"watchers":43,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rust-lang/rfcs/pulls/64"},"html":{"href":"https://github.com/rust-lang/rfcs/pull/64"},"issue":{"href":"https://api.github.com/repos/rust-lang/rfcs/issues/64"},"comments":{"href":"https://api.github.com/repos/rust-lang/rfcs/issues/64/comments"},"review_comments":{"href":"https://api.github.com/repos/rust-lang/rfcs/pulls/64/comments"},"review_comment":{"href":"https://api.github.com/repos/rust-lang/rfcs/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/rust-lang/rfcs/pulls/64/commits"},"statuses":{"href":"https://api.github.com/repos/rust-lang/rfcs/statuses/b43102121ecf7c8ab11237dd3b065291a0bf5b6a"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":47,"deletions":0,"changed_files":1}}