{"action":"created","issue":{"url":"https://api.github.com/repos/ocaml/ocaml/issues/671","repository_url":"https://api.github.com/repos/ocaml/ocaml","labels_url":"https://api.github.com/repos/ocaml/ocaml/issues/671/labels{/name}","comments_url":"https://api.github.com/repos/ocaml/ocaml/issues/671/comments","events_url":"https://api.github.com/repos/ocaml/ocaml/issues/671/events","html_url":"https://github.com/ocaml/ocaml/pull/671","id":164278595,"number":671,"title":"Add single-line comments","user":{"login":"let-def","id":1048096,"avatar_url":"https://avatars.githubusercontent.com/u/1048096?v=3","gravatar_id":"","url":"https://api.github.com/users/let-def","html_url":"https://github.com/let-def","followers_url":"https://api.github.com/users/let-def/followers","following_url":"https://api.github.com/users/let-def/following{/other_user}","gists_url":"https://api.github.com/users/let-def/gists{/gist_id}","starred_url":"https://api.github.com/users/let-def/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/let-def/subscriptions","organizations_url":"https://api.github.com/users/let-def/orgs","repos_url":"https://api.github.com/users/let-def/repos","events_url":"https://api.github.com/users/let-def/events{/privacy}","received_events_url":"https://api.github.com/users/let-def/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":61,"created_at":"2016-07-07T10:31:20Z","updated_at":"2016-09-15T06:33:20Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/ocaml/ocaml/pulls/671","html_url":"https://github.com/ocaml/ocaml/pull/671","diff_url":"https://github.com/ocaml/ocaml/pull/671.diff","patch_url":"https://github.com/ocaml/ocaml/pull/671.patch"},"body":"I propose to use `(*)` as a token for single line comments.\r\nThis delimiter seems to be a good fit as it already starts a comment but also produce a warning. As such it is unlikely to break existing code (though I didn't check).\r\n\r\nIn other words:\r\n```ocaml\r\ncode\r\n(* lalala *)\r\ncode\r\n```\r\nand:\r\n```ocaml\r\ncode\r\n(*) lalala\r\ncode\r\n```\r\nwould be equivalent.\r\n\r\nThis is a superficial feature but I got positive feedbacks from:\r\n- users of Reason, which features single line comment and would benefit from a direct mapping to OCaml.\r\n- adept of literate programming, who benefit from a lighter way to demarcate code and text lines.\r\n\r\nSo I thought it was worth getting the opinion of the broader community. "},"comment":{"url":"https://api.github.com/repos/ocaml/ocaml/issues/comments/247247242","html_url":"https://github.com/ocaml/ocaml/pull/671#issuecomment-247247242","issue_url":"https://api.github.com/repos/ocaml/ocaml/issues/671","id":247247242,"user":{"login":"paurkedal","id":144070,"avatar_url":"https://avatars.githubusercontent.com/u/144070?v=3","gravatar_id":"","url":"https://api.github.com/users/paurkedal","html_url":"https://github.com/paurkedal","followers_url":"https://api.github.com/users/paurkedal/followers","following_url":"https://api.github.com/users/paurkedal/following{/other_user}","gists_url":"https://api.github.com/users/paurkedal/gists{/gist_id}","starred_url":"https://api.github.com/users/paurkedal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paurkedal/subscriptions","organizations_url":"https://api.github.com/users/paurkedal/orgs","repos_url":"https://api.github.com/users/paurkedal/repos","events_url":"https://api.github.com/users/paurkedal/events{/privacy}","received_events_url":"https://api.github.com/users/paurkedal/received_events","type":"User","site_admin":false},"created_at":"2016-09-15T06:33:20Z","updated_at":"2016-09-15T06:33:20Z","body":"> Of course, it's not completely clear that multi-line comments are a bad thing, but what do people miss with single line comments?\r\n\r\nAs in inline comments only?  I would miss the possibility of ending a comment before the end-of-line, as in\r\n```ocaml\r\nmatch codepoint with\r\n | 0x0028 (* start parenthesis *) -> incr level\r\n | 0x0029 (* end parethesis *) -> decr level\r\n | _ -> ()\r\n```"}}
{"actor":{"display_login":"paurkedal"}}