<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
</head>
<body>
<div name="messageBodySection" style="font-size: 14px; font-family: -apple-system, BlinkMacSystemFont, sans-serif;">
<p style="margin: 0px; line-height: normal; font-family: 'Helvetica Neue'; color: rgb(51, 51, 51);">I fully agree there are no languages that deal with strings perfectly. That said there are those that are better at it and those that aren't so good. A language, where I need to look for a library to upcase or downcase my own name, fits into the second group in my book.</p>
</div>
<div name="messageSignatureSection" style="font-size: 14px; font-family: -apple-system, BlinkMacSystemFont, sans-serif;"><br />
MichaƂ.</div>
<div name="messageReplySection" style="font-size: 14px; font-family: -apple-system, BlinkMacSystemFont, sans-serif;"><br />
On 13 Jan 2017, 13:20 +0100, Jesper Louis Andersen <jesper.louis.andersen@gmail.com>, wrote:<br />
<blockquote type="cite" style="margin: 5px 5px; padding-left: 10px; border-left: thin solid #1abc9c;">
<div dir="ltr">
<div>
<div>
<div>
<div>Richard is indeed right, depending on what your definition of "String" is.<br />
<br /></div>
If a "String" is "An array of characters from some alphabet", then you need to take into account Strings are Unicode codepoints in practice. This is also the most precise definition from a technical point of view.<br />
<br /></div>
When I wrote my post, I was--probably incorrectly--assuming the older notion of a "String" where the representation is either ASCII or something like ISO-8859-15. In this case, a string coincides with a stream of bytes.<br />
<br /></div>
Data needs parsing. A lot of data comes in as some kind of stringy representation: UTF-8, byte array (binary), and so on.<br />
<br /></div>
And of course, that isn't the whole story, since there are examples of input which are not string-like in their forms.<br />
<br /></div>
<br />
<div class="gmail_quote">
<div dir="ltr">On Fri, Jan 13, 2017 at 2:34 AM Richard A. O'Keefe <<a href="mailto:ok@cs.otago.ac.nz">ok@cs.otago.ac.nz</a>> wrote:<br /></div>
<blockquote class="gmail_quote" style="margin: 5px 5px; padding-left: 10px; border-left: thin solid #e67e22;"><br class="gmail_msg" />
<br class="gmail_msg" />
On 13/01/17 8:56 AM, Jesper Louis Andersen wrote:<br class="gmail_msg" />
> Strings are really just streams of bytes.<br class="gmail_msg" />
<br class="gmail_msg" />
That was true a long time ago.  Maybe.<br class="gmail_msg" />
But it isn't anywhere near accurate as a description<br class="gmail_msg" />
of Unicode:<br class="gmail_msg" />
  - Unicode is made of 21-bit code points, not bytes.<br class="gmail_msg" />
  - Most possible code points are not defined.<br class="gmail_msg" />
  - Some of those that are defined are defined as<br class="gmail_msg" />
    "it is illegal to use this".<br class="gmail_msg" />
  - Unicode sequences have *structure*; it is simply<br class="gmail_msg" />
    not the case that every sequence of allowable<br class="gmail_msg" />
    Unicode code points is a legal Unicode string.<br class="gmail_msg" />
  - As a special case of that, if s is a non-empty<br class="gmail_msg" />
    valid Unicode string, it is not true that every<br class="gmail_msg" />
    substring of s is a valid Unicode string.<br class="gmail_msg" />
<br class="gmail_msg" />
In case you were thinking of UTF-8, not all byte<br class="gmail_msg" />
sequences are valid UTF-8.<br class="gmail_msg" />
<br class="gmail_msg" />
Byte streams are as important as you say, but it's<br class="gmail_msg" />
really hard to see the software for a radar or a<br class="gmail_msg" />
radio telescope as processing strings...<br class="gmail_msg" />
<br class="gmail_msg" /></blockquote>
</div>
_______________________________________________<br />
erlang-questions mailing list<br />
erlang-questions@erlang.org<br />
http://erlang.org/mailman/listinfo/erlang-questions<br /></blockquote>
</div>
</body>
</html>