Re: Unicode strings and invalid codepoints
Chris Angelico <[email protected]>
| Newsgroups | gmane.comp.lang.pike.user |
|---|---|
| Message-ID | <CAPTjJmro3LjJkoXeo4yX8rdP2bazyMOOBvZB3kXVGcpH2ti0dQ@mail.gmail.com> |
On Sat, Mar 21, 2015 at 4:27 AM, Fredrik Hubinette <[email protected]> wrote: > Pike strings are arrays of 32-bit numbers. > Some functions assume that they contain unicode characters, most don't. > > What you suggest requires implementing a way to type strings depending on > their content, and then enforce the validity of the content based on the > type. Doing so would seem to be a lot of work for very little gain. How many > minutes/hours of developer time have you personally lost because pike didn't > detect U+D800 in unicode strings early enough? That was where this question started. Is it something that's simply "not worth the effort of disallowing", or is there actually a solid use-case for needing those codepoints? If the easy implementation had been to disallow them, would it have been worth putting effort into allowing them? So far, all I'm seeing is that it's not going to make any difference either way, so the better option is the easier one - ie check nothing, and permit them all. Haven't heard from anyone who actually needs them. ChrisA