{"action":"created","issue":{"url":"https://api.github.com/repos/nim-lang/Nim/issues/3261","labels_url":"https://api.github.com/repos/nim-lang/Nim/issues/3261/labels{/name}","comments_url":"https://api.github.com/repos/nim-lang/Nim/issues/3261/comments","events_url":"https://api.github.com/repos/nim-lang/Nim/issues/3261/events","html_url":"https://github.com/nim-lang/Nim/pull/3261","id":103693311,"number":3261,"title":"Check for nil when converting from string to cstring","user":{"login":"yglukhov","id":6962409,"avatar_url":"https://avatars.githubusercontent.com/u/6962409?v=3","gravatar_id":"","url":"https://api.github.com/users/yglukhov","html_url":"https://github.com/yglukhov","followers_url":"https://api.github.com/users/yglukhov/followers","following_url":"https://api.github.com/users/yglukhov/following{/other_user}","gists_url":"https://api.github.com/users/yglukhov/gists{/gist_id}","starred_url":"https://api.github.com/users/yglukhov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yglukhov/subscriptions","organizations_url":"https://api.github.com/users/yglukhov/orgs","repos_url":"https://api.github.com/users/yglukhov/repos","events_url":"https://api.github.com/users/yglukhov/events{/privacy}","received_events_url":"https://api.github.com/users/yglukhov/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-08-28T10:30:22Z","updated_at":"2015-09-04T14:06:20Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/nim-lang/Nim/pulls/3261","html_url":"https://github.com/nim-lang/Nim/pull/3261","diff_url":"https://github.com/nim-lang/Nim/pull/3261.diff","patch_url":"https://github.com/nim-lang/Nim/pull/3261.patch"},"body":""},"comment":{"url":"https://api.github.com/repos/nim-lang/Nim/issues/comments/137746206","html_url":"https://github.com/nim-lang/Nim/pull/3261#issuecomment-137746206","issue_url":"https://api.github.com/repos/nim-lang/Nim/issues/3261","id":137746206,"user":{"login":"yglukhov","id":6962409,"avatar_url":"https://avatars.githubusercontent.com/u/6962409?v=3","gravatar_id":"","url":"https://api.github.com/users/yglukhov","html_url":"https://github.com/yglukhov","followers_url":"https://api.github.com/users/yglukhov/followers","following_url":"https://api.github.com/users/yglukhov/following{/other_user}","gists_url":"https://api.github.com/users/yglukhov/gists{/gist_id}","starred_url":"https://api.github.com/users/yglukhov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yglukhov/subscriptions","organizations_url":"https://api.github.com/users/yglukhov/orgs","repos_url":"https://api.github.com/users/yglukhov/repos","events_url":"https://api.github.com/users/yglukhov/events{/privacy}","received_events_url":"https://api.github.com/users/yglukhov/received_events","type":"User","site_admin":false},"created_at":"2015-09-04T14:06:20Z","updated_at":"2015-09-04T14:06:20Z","body":"But there are lots of functions that handle NULL cstring properly. And for such functions, a statement that Nim converts strings transparently does not hold. It's not intuitive, and you always have to remember to explicitly convert for such functions. Intuitively, NULL by itself is a perfectly valid value for both string and cstring, and semantically they mean the same to me."}}