{"action":"opened","issue":{"url":"https://api.github.com/repos/purescript/purescript-strings/issues/25","labels_url":"https://api.github.com/repos/purescript/purescript-strings/issues/25/labels{/name}","comments_url":"https://api.github.com/repos/purescript/purescript-strings/issues/25/comments","events_url":"https://api.github.com/repos/purescript/purescript-strings/issues/25/events","html_url":"https://github.com/purescript/purescript-strings/issues/25","id":63266135,"number":25,"title":"Data.String.Unsafe is very unsafe","user":{"login":"brainrape","id":302429,"avatar_url":"https://avatars.githubusercontent.com/u/302429?v=3","gravatar_id":"","url":"https://api.github.com/users/brainrape","html_url":"https://github.com/brainrape","followers_url":"https://api.github.com/users/brainrape/followers","following_url":"https://api.github.com/users/brainrape/following{/other_user}","gists_url":"https://api.github.com/users/brainrape/gists{/gist_id}","starred_url":"https://api.github.com/users/brainrape/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brainrape/subscriptions","organizations_url":"https://api.github.com/users/brainrape/orgs","repos_url":"https://api.github.com/users/brainrape/repos","events_url":"https://api.github.com/users/brainrape/events{/privacy}","received_events_url":"https://api.github.com/users/brainrape/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-03-20T17:08:12Z","updated_at":"2015-03-20T17:08:12Z","closed_at":null,"body":"Unsafe `charAt` and `charCodeAt` should either throw an exception or return a legal value (say `Char \"\\0\"` and `-1`) if the index is out of bounds, so they won't be able cause exceptions later in the code.\r\nIf one really want to use it without the bounds check (for efficiency?), one can define one's own foreign function.\r\nAn exception seems the better option. If this makes sense, I'll PR."}}