{"action":"created","issue":{"url":"https://api.github.com/repos/JuliaLang/julia/issues/14383","labels_url":"https://api.github.com/repos/JuliaLang/julia/issues/14383/labels{/name}","comments_url":"https://api.github.com/repos/JuliaLang/julia/issues/14383/comments","events_url":"https://api.github.com/repos/JuliaLang/julia/issues/14383/events","html_url":"https://github.com/JuliaLang/julia/pull/14383","id":121883938,"number":14383,"title":"RFC, WIP: highlander","user":{"login":"StefanKarpinski","id":153596,"avatar_url":"https://avatars.githubusercontent.com/u/153596?v=3","gravatar_id":"","url":"https://api.github.com/users/StefanKarpinski","html_url":"https://github.com/StefanKarpinski","followers_url":"https://api.github.com/users/StefanKarpinski/followers","following_url":"https://api.github.com/users/StefanKarpinski/following{/other_user}","gists_url":"https://api.github.com/users/StefanKarpinski/gists{/gist_id}","starred_url":"https://api.github.com/users/StefanKarpinski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/StefanKarpinski/subscriptions","organizations_url":"https://api.github.com/users/StefanKarpinski/orgs","repos_url":"https://api.github.com/users/StefanKarpinski/repos","events_url":"https://api.github.com/users/StefanKarpinski/events{/privacy}","received_events_url":"https://api.github.com/users/StefanKarpinski/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-12-12T22:11:27Z","updated_at":"2015-12-13T21:49:27Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/JuliaLang/julia/pulls/14383","html_url":"https://github.com/JuliaLang/julia/pull/14383","diff_url":"https://github.com/JuliaLang/julia/pull/14383.diff","patch_url":"https://github.com/JuliaLang/julia/pull/14383.patch"},"body":"This branch is a preview of where I'd like to go with built-in string types, except that I'd like to take it even further. So far this branch collapses `ASCIIString` and `UTF8String` into a single, concrete UTF-8 string type called `String`. In addition to this, I'd like to make the representation of `String` and `SubString{String}` the same, removing that distinction as well. I'd also like to move all non-String string types out of Base and into a `StringEncodings` package (or something like that). We can keep simple utility functions to transcode `String` to UTF-16 on Windows for system calls, but otherwise, no non-UTF-8 functionality would exist in Base. Then there would truly be only one (string type in base, that is).\r\n\r\nAdditionally, I'd like to replace the current `Char` type with a new `Char` type that leaves UTF-8-like data as-is, allowing character indexing and iteration to do far less work in the common case where you don't actually care about the values of code points (you can still check equality and ordering because of the cleverness of UTF-8). That would reduce the performance penalty of using UTF-8 everywhere.\r\n\r\nComments and thoughts welcomed."},"comment":{"url":"https://api.github.com/repos/JuliaLang/julia/issues/comments/164301258","html_url":"https://github.com/JuliaLang/julia/pull/14383#issuecomment-164301258","issue_url":"https://api.github.com/repos/JuliaLang/julia/issues/14383","id":164301258,"user":{"login":"simonbyrne","id":1692009,"avatar_url":"https://avatars.githubusercontent.com/u/1692009?v=3","gravatar_id":"","url":"https://api.github.com/users/simonbyrne","html_url":"https://github.com/simonbyrne","followers_url":"https://api.github.com/users/simonbyrne/followers","following_url":"https://api.github.com/users/simonbyrne/following{/other_user}","gists_url":"https://api.github.com/users/simonbyrne/gists{/gist_id}","starred_url":"https://api.github.com/users/simonbyrne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simonbyrne/subscriptions","organizations_url":"https://api.github.com/users/simonbyrne/orgs","repos_url":"https://api.github.com/users/simonbyrne/repos","events_url":"https://api.github.com/users/simonbyrne/events{/privacy}","received_events_url":"https://api.github.com/users/simonbyrne/received_events","type":"User","site_admin":false},"created_at":"2015-12-13T21:49:27Z","updated_at":"2015-12-13T21:49:27Z","body":"While I'm broadly in favour, I think it would be worthwhile getting some good benchmarks together so we have a rough idea of what the cost is going to be in terms of performance.For example, the following function\r\n```julia\r\nfunction hasspace(s)\r\n    for c in s\r\n        isspace(c) && return true\r\n    end\r\n    false\r\nend\r\n```\r\nis 6x faster for an `ASCIIString` vs the same data in a `UTF8String`."}}