{"action":"created","comment":{"url":"https://api.github.com/repos/paritytech/wiki/pulls/comments/285527788","pull_request_review_id":239416950,"id":285527788,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI4NTUyNzc4OA==","diff_hunk":"@@ -127,3 +127,11 @@ let mut target_path =\n \t\tqed\"\n \t);\n ```\n+\n+- Unsafe code requires explicit proofs as panickers do. When introducing the unsafe code, one should\n+consider tradeoffs between efficiency on one hand and reliability, maintenance costs, and security on the other. \n+Here is a list of questions that may help to evaluate the tradeoffs:\n+    - how much more performant or compact the resulting code will get using unsafe code, ","path":"Substrate-Style-Guide.md","position":8,"original_position":8,"commit_id":"6cc84ea06ae33870c2a9b84a116999457e5cbd98","original_commit_id":"6cc84ea06ae33870c2a9b84a116999457e5cbd98","user":{"login":"dvdplm","id":18515,"node_id":"MDQ6VXNlcjE4NTE1","avatar_url":"https://avatars2.githubusercontent.com/u/18515?v=4","gravatar_id":"","url":"https://api.github.com/users/dvdplm","html_url":"https://github.com/dvdplm","followers_url":"https://api.github.com/users/dvdplm/followers","following_url":"https://api.github.com/users/dvdplm/following{/other_user}","gists_url":"https://api.github.com/users/dvdplm/gists{/gist_id}","starred_url":"https://api.github.com/users/dvdplm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dvdplm/subscriptions","organizations_url":"https://api.github.com/users/dvdplm/orgs","repos_url":"https://api.github.com/users/dvdplm/repos","events_url":"https://api.github.com/users/dvdplm/events{/privacy}","received_events_url":"https://api.github.com/users/dvdplm/received_events","type":"User","site_admin":false},"body":"```suggestion\r\n    - how much more performant or compact the resulting code will be using unsafe code, \r\n```","created_at":"2019-05-20T10:35:30Z","updated_at":"2019-05-20T10:39:51Z","html_url":"https://github.com/paritytech/wiki/pull/334#discussion_r285527788","pull_request_url":"https://api.github.com/repos/paritytech/wiki/pulls/334","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/paritytech/wiki/pulls/comments/285527788"},"html":{"href":"https://github.com/paritytech/wiki/pull/334#discussion_r285527788"},"pull_request":{"href":"https://api.github.com/repos/paritytech/wiki/pulls/334"}}},"pull_request":{"url":"https://api.github.com/repos/paritytech/wiki/pulls/334","id":280329930,"node_id":"MDExOlB1bGxSZXF1ZXN0MjgwMzI5OTMw","html_url":"https://github.com/paritytech/wiki/pull/334","diff_url":"https://github.com/paritytech/wiki/pull/334.diff","patch_url":"https://github.com/paritytech/wiki/pull/334.patch","issue_url":"https://api.github.com/repos/paritytech/wiki/issues/334","number":334,"state":"open","locked":false,"title":"Add the item about unsafe code","user":{"login":"pepyakin","id":2205845,"node_id":"MDQ6VXNlcjIyMDU4NDU=","avatar_url":"https://avatars2.githubusercontent.com/u/2205845?v=4","gravatar_id":"","url":"https://api.github.com/users/pepyakin","html_url":"https://github.com/pepyakin","followers_url":"https://api.github.com/users/pepyakin/followers","following_url":"https://api.github.com/users/pepyakin/following{/other_user}","gists_url":"https://api.github.com/users/pepyakin/gists{/gist_id}","starred_url":"https://api.github.com/users/pepyakin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pepyakin/subscriptions","organizations_url":"https://api.github.com/users/pepyakin/orgs","repos_url":"https://api.github.com/users/pepyakin/repos","events_url":"https://api.github.com/users/pepyakin/events{/privacy}","received_events_url":"https://api.github.com/users/pepyakin/received_events","type":"User","site_admin":false},"body":"The previous PR, #331, ended up being only about panickers. Here is the one that codifies the recently discussed entry about [unsafe code](https://forum.parity.io/t/usage-of-unsafe-code/240).\r\n\r\nThere is no example attached because I couldn't come up with one. I really do not want to add an artificial example here since it seems to me that it would be worse than not having a one. However, I am not sure and can add one if requested. It can be added as a follow-up as well (this is also true for #331).\r\n\r\nPlease don't merge it instantly, since I have a gut feeling that there might be whitespots with this proposal.","created_at":"2019-05-20T10:26:39Z","updated_at":"2019-05-20T10:39:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"81b8fc9c7d2f22ce45c733838c2407223e41f95b","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":795866125,"node_id":"MDU6TGFiZWw3OTU4NjYxMjU=","url":"https://api.github.com/repos/paritytech/wiki/labels/A0-pleasereview","name":"A0-pleasereview","color":"666666","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/paritytech/wiki/pulls/334/commits","review_comments_url":"https://api.github.com/repos/paritytech/wiki/pulls/334/comments","review_comment_url":"https://api.github.com/repos/paritytech/wiki/pulls/comments{/number}","comments_url":"https://api.github.com/repos/paritytech/wiki/issues/334/comments","statuses_url":"https://api.github.com/repos/paritytech/wiki/statuses/6cc84ea06ae33870c2a9b84a116999457e5cbd98","head":{"label":"paritytech:ser-style-unsafe","ref":"ser-style-unsafe","sha":"6cc84ea06ae33870c2a9b84a116999457e5cbd98","user":{"login":"paritytech","id":14176906,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE0MTc2OTA2","avatar_url":"https://avatars2.githubusercontent.com/u/14176906?v=4","gravatar_id":"","url":"https://api.github.com/users/paritytech","html_url":"https://github.com/paritytech","followers_url":"https://api.github.com/users/paritytech/followers","following_url":"https://api.github.com/users/paritytech/following{/other_user}","gists_url":"https://api.github.com/users/paritytech/gists{/gist_id}","starred_url":"https://api.github.com/users/paritytech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paritytech/subscriptions","organizations_url":"https://api.github.com/users/paritytech/orgs","repos_url":"https://api.github.com/users/paritytech/repos","events_url":"https://api.github.com/users/paritytech/events{/privacy}","received_events_url":"https://api.github.com/users/paritytech/received_events","type":"Organization","site_admin":false},"repo":{"id":116377729,"node_id":"MDEwOlJlcG9zaXRvcnkxMTYzNzc3Mjk=","name":"wiki","full_name":"paritytech/wiki","private":false,"owner":{"login":"paritytech","id":14176906,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE0MTc2OTA2","avatar_url":"https://avatars2.githubusercontent.com/u/14176906?v=4","gravatar_id":"","url":"https://api.github.com/users/paritytech","html_url":"https://github.com/paritytech","followers_url":"https://api.github.com/users/paritytech/followers","following_url":"https://api.github.com/users/paritytech/following{/other_user}","gists_url":"https://api.github.com/users/paritytech/gists{/gist_id}","starred_url":"https://api.github.com/users/paritytech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paritytech/subscriptions","organizations_url":"https://api.github.com/users/paritytech/orgs","repos_url":"https://api.github.com/users/paritytech/repos","events_url":"https://api.github.com/users/paritytech/events{/privacy}","received_events_url":"https://api.github.com/users/paritytech/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/paritytech/wiki","description":"The Parity Ethereum Documentation","fork":false,"url":"https://api.github.com/repos/paritytech/wiki","forks_url":"https://api.github.com/repos/paritytech/wiki/forks","keys_url":"https://api.github.com/repos/paritytech/wiki/keys{/key_id}","collaborators_url":"https://api.github.com/repos/paritytech/wiki/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/paritytech/wiki/teams","hooks_url":"https://api.github.com/repos/paritytech/wiki/hooks","issue_events_url":"https://api.github.com/repos/paritytech/wiki/issues/events{/number}","events_url":"https://api.github.com/repos/paritytech/wiki/events","assignees_url":"https://api.github.com/repos/paritytech/wiki/assignees{/user}","branches_url":"https://api.github.com/repos/paritytech/wiki/branches{/branch}","tags_url":"https://api.github.com/repos/paritytech/wiki/tags","blobs_url":"https://api.github.com/repos/paritytech/wiki/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/paritytech/wiki/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/paritytech/wiki/git/refs{/sha}","trees_url":"https://api.github.com/repos/paritytech/wiki/git/trees{/sha}","statuses_url":"https://api.github.com/repos/paritytech/wiki/statuses/{sha}","languages_url":"https://api.github.com/repos/paritytech/wiki/languages","stargazers_url":"https://api.github.com/repos/paritytech/wiki/stargazers","contributors_url":"https://api.github.com/repos/paritytech/wiki/contributors","subscribers_url":"https://api.github.com/repos/paritytech/wiki/subscribers","subscription_url":"https://api.github.com/repos/paritytech/wiki/subscription","commits_url":"https://api.github.com/repos/paritytech/wiki/commits{/sha}","git_commits_url":"https://api.github.com/repos/paritytech/wiki/git/commits{/sha}","comments_url":"https://api.github.com/repos/paritytech/wiki/comments{/number}","issue_comment_url":"https://api.github.com/repos/paritytech/wiki/issues/comments{/number}","contents_url":"https://api.github.com/repos/paritytech/wiki/contents/{+path}","compare_url":"https://api.github.com/repos/paritytech/wiki/compare/{base}...{head}","merges_url":"https://api.github.com/repos/paritytech/wiki/merges","archive_url":"https://api.github.com/repos/paritytech/wiki/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/paritytech/wiki/downloads","issues_url":"https://api.github.com/repos/paritytech/wiki/issues{/number}","pulls_url":"https://api.github.com/repos/paritytech/wiki/pulls{/number}","milestones_url":"https://api.github.com/repos/paritytech/wiki/milestones{/number}","notifications_url":"https://api.github.com/repos/paritytech/wiki/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/paritytech/wiki/labels{/name}","releases_url":"https://api.github.com/repos/paritytech/wiki/releases{/id}","deployments_url":"https://api.github.com/repos/paritytech/wiki/deployments","created_at":"2018-01-05T11:24:06Z","updated_at":"2019-05-15T09:08:57Z","pushed_at":"2019-05-20T10:26:39Z","git_url":"git://github.com/paritytech/wiki.git","ssh_url":"git@github.com:paritytech/wiki.git","clone_url":"https://github.com/paritytech/wiki.git","svn_url":"https://github.com/paritytech/wiki","homepage":"https://wiki.parity.io","size":38029,"stargazers_count":64,"watchers_count":64,"language":"CSS","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":74,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":15,"license":{"key":"cc-by-sa-4.0","name":"Creative Commons Attribution Share Alike 4.0 International","spdx_id":"CC-BY-SA-4.0","url":"https://api.github.com/licenses/cc-by-sa-4.0","node_id":"MDc6TGljZW5zZTI2"},"forks":74,"open_issues":15,"watchers":64,"default_branch":"master"}},"base":{"label":"paritytech:master","ref":"master","sha":"03ae59ccc7f0df0200d434038de60a0f585b4969","user":{"login":"paritytech","id":14176906,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE0MTc2OTA2","avatar_url":"https://avatars2.githubusercontent.com/u/14176906?v=4","gravatar_id":"","url":"https://api.github.com/users/paritytech","html_url":"https://github.com/paritytech","followers_url":"https://api.github.com/users/paritytech/followers","following_url":"https://api.github.com/users/paritytech/following{/other_user}","gists_url":"https://api.github.com/users/paritytech/gists{/gist_id}","starred_url":"https://api.github.com/users/paritytech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paritytech/subscriptions","organizations_url":"https://api.github.com/users/paritytech/orgs","repos_url":"https://api.github.com/users/paritytech/repos","events_url":"https://api.github.com/users/paritytech/events{/privacy}","received_events_url":"https://api.github.com/users/paritytech/received_events","type":"Organization","site_admin":false},"repo":{"id":116377729,"node_id":"MDEwOlJlcG9zaXRvcnkxMTYzNzc3Mjk=","name":"wiki","full_name":"paritytech/wiki","private":false,"owner":{"login":"paritytech","id":14176906,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE0MTc2OTA2","avatar_url":"https://avatars2.githubusercontent.com/u/14176906?v=4","gravatar_id":"","url":"https://api.github.com/users/paritytech","html_url":"https://github.com/paritytech","followers_url":"https://api.github.com/users/paritytech/followers","following_url":"https://api.github.com/users/paritytech/following{/other_user}","gists_url":"https://api.github.com/users/paritytech/gists{/gist_id}","starred_url":"https://api.github.com/users/paritytech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paritytech/subscriptions","organizations_url":"https://api.github.com/users/paritytech/orgs","repos_url":"https://api.github.com/users/paritytech/repos","events_url":"https://api.github.com/users/paritytech/events{/privacy}","received_events_url":"https://api.github.com/users/paritytech/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/paritytech/wiki","description":"The Parity Ethereum Documentation","fork":false,"url":"https://api.github.com/repos/paritytech/wiki","forks_url":"https://api.github.com/repos/paritytech/wiki/forks","keys_url":"https://api.github.com/repos/paritytech/wiki/keys{/key_id}","collaborators_url":"https://api.github.com/repos/paritytech/wiki/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/paritytech/wiki/teams","hooks_url":"https://api.github.com/repos/paritytech/wiki/hooks","issue_events_url":"https://api.github.com/repos/paritytech/wiki/issues/events{/number}","events_url":"https://api.github.com/repos/paritytech/wiki/events","assignees_url":"https://api.github.com/repos/paritytech/wiki/assignees{/user}","branches_url":"https://api.github.com/repos/paritytech/wiki/branches{/branch}","tags_url":"https://api.github.com/repos/paritytech/wiki/tags","blobs_url":"https://api.github.com/repos/paritytech/wiki/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/paritytech/wiki/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/paritytech/wiki/git/refs{/sha}","trees_url":"https://api.github.com/repos/paritytech/wiki/git/trees{/sha}","statuses_url":"https://api.github.com/repos/paritytech/wiki/statuses/{sha}","languages_url":"https://api.github.com/repos/paritytech/wiki/languages","stargazers_url":"https://api.github.com/repos/paritytech/wiki/stargazers","contributors_url":"https://api.github.com/repos/paritytech/wiki/contributors","subscribers_url":"https://api.github.com/repos/paritytech/wiki/subscribers","subscription_url":"https://api.github.com/repos/paritytech/wiki/subscription","commits_url":"https://api.github.com/repos/paritytech/wiki/commits{/sha}","git_commits_url":"https://api.github.com/repos/paritytech/wiki/git/commits{/sha}","comments_url":"https://api.github.com/repos/paritytech/wiki/comments{/number}","issue_comment_url":"https://api.github.com/repos/paritytech/wiki/issues/comments{/number}","contents_url":"https://api.github.com/repos/paritytech/wiki/contents/{+path}","compare_url":"https://api.github.com/repos/paritytech/wiki/compare/{base}...{head}","merges_url":"https://api.github.com/repos/paritytech/wiki/merges","archive_url":"https://api.github.com/repos/paritytech/wiki/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/paritytech/wiki/downloads","issues_url":"https://api.github.com/repos/paritytech/wiki/issues{/number}","pulls_url":"https://api.github.com/repos/paritytech/wiki/pulls{/number}","milestones_url":"https://api.github.com/repos/paritytech/wiki/milestones{/number}","notifications_url":"https://api.github.com/repos/paritytech/wiki/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/paritytech/wiki/labels{/name}","releases_url":"https://api.github.com/repos/paritytech/wiki/releases{/id}","deployments_url":"https://api.github.com/repos/paritytech/wiki/deployments","created_at":"2018-01-05T11:24:06Z","updated_at":"2019-05-15T09:08:57Z","pushed_at":"2019-05-20T10:26:39Z","git_url":"git://github.com/paritytech/wiki.git","ssh_url":"git@github.com:paritytech/wiki.git","clone_url":"https://github.com/paritytech/wiki.git","svn_url":"https://github.com/paritytech/wiki","homepage":"https://wiki.parity.io","size":38029,"stargazers_count":64,"watchers_count":64,"language":"CSS","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":74,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":15,"license":{"key":"cc-by-sa-4.0","name":"Creative Commons Attribution Share Alike 4.0 International","spdx_id":"CC-BY-SA-4.0","url":"https://api.github.com/licenses/cc-by-sa-4.0","node_id":"MDc6TGljZW5zZTI2"},"forks":74,"open_issues":15,"watchers":64,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/paritytech/wiki/pulls/334"},"html":{"href":"https://github.com/paritytech/wiki/pull/334"},"issue":{"href":"https://api.github.com/repos/paritytech/wiki/issues/334"},"comments":{"href":"https://api.github.com/repos/paritytech/wiki/issues/334/comments"},"review_comments":{"href":"https://api.github.com/repos/paritytech/wiki/pulls/334/comments"},"review_comment":{"href":"https://api.github.com/repos/paritytech/wiki/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/paritytech/wiki/pulls/334/commits"},"statuses":{"href":"https://api.github.com/repos/paritytech/wiki/statuses/6cc84ea06ae33870c2a9b84a116999457e5cbd98"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"dvdplm"}}