{"action":"created","issue":{"url":"https://api.github.com/repos/dotnet/roslyn/issues/215","repository_url":"https://api.github.com/repos/dotnet/roslyn","labels_url":"https://api.github.com/repos/dotnet/roslyn/issues/215/labels{/name}","comments_url":"https://api.github.com/repos/dotnet/roslyn/issues/215/comments","events_url":"https://api.github.com/repos/dotnet/roslyn/issues/215/events","html_url":"https://github.com/dotnet/roslyn/issues/215","id":56420910,"number":215,"title":"Proposal: Binary literals","user":{"login":"MadsTorgersen","id":6677272,"avatar_url":"https://avatars.githubusercontent.com/u/6677272?v=3","gravatar_id":"","url":"https://api.github.com/users/MadsTorgersen","html_url":"https://github.com/MadsTorgersen","followers_url":"https://api.github.com/users/MadsTorgersen/followers","following_url":"https://api.github.com/users/MadsTorgersen/following{/other_user}","gists_url":"https://api.github.com/users/MadsTorgersen/gists{/gist_id}","starred_url":"https://api.github.com/users/MadsTorgersen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MadsTorgersen/subscriptions","organizations_url":"https://api.github.com/users/MadsTorgersen/orgs","repos_url":"https://api.github.com/users/MadsTorgersen/repos","events_url":"https://api.github.com/users/MadsTorgersen/events{/privacy}","received_events_url":"https://api.github.com/users/MadsTorgersen/received_events","type":"User","site_admin":false},"labels":[{"id":167974280,"url":"https://api.github.com/repos/dotnet/roslyn/labels/4%20-%20In%20Review","name":"4 - In Review","color":"CCCCCC","default":false},{"id":169838071,"url":"https://api.github.com/repos/dotnet/roslyn/labels/Area-Language%20Design","name":"Area-Language Design","color":"5319e7","default":false},{"id":166677091,"url":"https://api.github.com/repos/dotnet/roslyn/labels/Feature%20Request","name":"Feature Request","color":"fc2929","default":false},{"id":258871715,"url":"https://api.github.com/repos/dotnet/roslyn/labels/Feature%20Specification","name":"Feature Specification","color":"fc2929","default":false},{"id":166377946,"url":"https://api.github.com/repos/dotnet/roslyn/labels/Language-C%23","name":"Language-C#","color":"207de5","default":false},{"id":324461847,"url":"https://api.github.com/repos/dotnet/roslyn/labels/New%20Language%20Feature%20-%20Binary%20Literals","name":"New Language Feature - Binary Literals","color":"bfd4f2","default":false}],"state":"open","locked":false,"assignee":{"login":"MadsTorgersen","id":6677272,"avatar_url":"https://avatars.githubusercontent.com/u/6677272?v=3","gravatar_id":"","url":"https://api.github.com/users/MadsTorgersen","html_url":"https://github.com/MadsTorgersen","followers_url":"https://api.github.com/users/MadsTorgersen/followers","following_url":"https://api.github.com/users/MadsTorgersen/following{/other_user}","gists_url":"https://api.github.com/users/MadsTorgersen/gists{/gist_id}","starred_url":"https://api.github.com/users/MadsTorgersen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MadsTorgersen/subscriptions","organizations_url":"https://api.github.com/users/MadsTorgersen/orgs","repos_url":"https://api.github.com/users/MadsTorgersen/repos","events_url":"https://api.github.com/users/MadsTorgersen/events{/privacy}","received_events_url":"https://api.github.com/users/MadsTorgersen/received_events","type":"User","site_admin":false},"assignees":[{"login":"MadsTorgersen","id":6677272,"avatar_url":"https://avatars.githubusercontent.com/u/6677272?v=3","gravatar_id":"","url":"https://api.github.com/users/MadsTorgersen","html_url":"https://github.com/MadsTorgersen","followers_url":"https://api.github.com/users/MadsTorgersen/followers","following_url":"https://api.github.com/users/MadsTorgersen/following{/other_user}","gists_url":"https://api.github.com/users/MadsTorgersen/gists{/gist_id}","starred_url":"https://api.github.com/users/MadsTorgersen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MadsTorgersen/subscriptions","organizations_url":"https://api.github.com/users/MadsTorgersen/orgs","repos_url":"https://api.github.com/users/MadsTorgersen/repos","events_url":"https://api.github.com/users/MadsTorgersen/events{/privacy}","received_events_url":"https://api.github.com/users/MadsTorgersen/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/dotnet/roslyn/milestones/16","html_url":"https://github.com/dotnet/roslyn/milestones/2.0%20(RTM)","labels_url":"https://api.github.com/repos/dotnet/roslyn/milestones/16/labels","id":1571384,"number":16,"title":"2.0 (RTM)","description":"","creator":{"login":"davkean","id":1103906,"avatar_url":"https://avatars.githubusercontent.com/u/1103906?v=3","gravatar_id":"","url":"https://api.github.com/users/davkean","html_url":"https://github.com/davkean","followers_url":"https://api.github.com/users/davkean/followers","following_url":"https://api.github.com/users/davkean/following{/other_user}","gists_url":"https://api.github.com/users/davkean/gists{/gist_id}","starred_url":"https://api.github.com/users/davkean/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davkean/subscriptions","organizations_url":"https://api.github.com/users/davkean/orgs","repos_url":"https://api.github.com/users/davkean/repos","events_url":"https://api.github.com/users/davkean/events{/privacy}","received_events_url":"https://api.github.com/users/davkean/received_events","type":"User","site_admin":false},"open_issues":573,"closed_issues":142,"state":"open","created_at":"2016-02-08T21:54:04Z","updated_at":"2016-11-23T06:10:01Z","due_on":null,"closed_at":null},"comments":37,"created_at":"2015-02-03T19:01:03Z","updated_at":"2016-11-23T13:48:35Z","closed_at":null,"body":"There’s a relatively common request to add binary literals to C# and VB. For bitmasks (e.g. flag enums) this seems genuinely useful, but it would also be great just for educational purposes.\n\nBinary literals would look like this:\n\n``` c#\nint nineteen = 0b10011;\n```\n\nSyntactically and semantically they are identical to hexadecimal literals, except for using `b`/`B` instead of `x`/`X`, having only digits `0` and `1` and being interpreted in base 2 instead of 16.\n\nThere’s little cost to implementing these, and little conceptual overhead to users of the language.\n# Syntax\n\nThe grammar would be as follows:\n\n> _integer-literal:_\n> &emsp;  ...\n> &emsp;  _binary-integer-literal_\n> \n> _binary-integer-literal:_\n> &emsp;  `0b`  &emsp;  _binary-digits_  &emsp;  _integer-type-suffixopt_\n> &emsp;  `0B`  &emsp;  _binary-digits_  &emsp;  _integer-type-suffixopt_\n> \n> _binary-digits:_\n> &emsp;  _binary-digit_\n> &emsp;  _binary-digits_  &emsp;  _binary-digit_\n> \n> _binary-digit:_  &emsp; one of\n> &emsp;  `0`  `1`\n"},"comment":{"url":"https://api.github.com/repos/dotnet/roslyn/issues/comments/262516907","html_url":"https://github.com/dotnet/roslyn/issues/215#issuecomment-262516907","issue_url":"https://api.github.com/repos/dotnet/roslyn/issues/215","id":262516907,"user":{"login":"strohlaj","id":7318452,"avatar_url":"https://avatars.githubusercontent.com/u/7318452?v=3","gravatar_id":"","url":"https://api.github.com/users/strohlaj","html_url":"https://github.com/strohlaj","followers_url":"https://api.github.com/users/strohlaj/followers","following_url":"https://api.github.com/users/strohlaj/following{/other_user}","gists_url":"https://api.github.com/users/strohlaj/gists{/gist_id}","starred_url":"https://api.github.com/users/strohlaj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/strohlaj/subscriptions","organizations_url":"https://api.github.com/users/strohlaj/orgs","repos_url":"https://api.github.com/users/strohlaj/repos","events_url":"https://api.github.com/users/strohlaj/events{/privacy}","received_events_url":"https://api.github.com/users/strohlaj/received_events","type":"User","site_admin":false},"created_at":"2016-11-23T13:48:35Z","updated_at":"2016-11-23T13:48:35Z","body":"@paulomorgado  \r\nI've tried thinking of a hypothetical situation where it would make more sense but nothing comes immediately to my mind. I will say that it's nice from an educational perspective. For students to visually see the negative integers in binary form as they actually are would be nice for teaching how ones compliment works. "}}
{"actor":{"display_login":"strohlaj"}}