<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, Feb 2, 2015 at 4:00 PM, James Noble <span dir="ltr"><<a href="mailto:kjx@ecs.vuw.ac.nz" target="_blank">kjx@ecs.vuw.ac.nz</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 28/01/2015, at 06:33 am, Lex Spoon <<a href="mailto:lex@lexspoon.org">lex@lexspoon.org</a>> wrote:<br>
<br>
> Go does not have that constraint, and they went with narrow, byte-based strings. That strikes me as a good choice. Java, JavaScript, and the Microsoft foundation libraries all use wide strings, but it hasn't worked out very well in practice.<br>
<br>
</span>Lex - right - but as Michael pointed out, that will be difficult to understand, especially for novices, when iterating through the string produces bytes, not characters. Or am I missing something here?<br>
<br>
being able to write this seems quite important to me - James<br>
<br>
<br>
def myName = "Pélé ℬヂコ"<br>
<br>
print "whole name: {myName}"<br>
print "each character"<br>
for (myName) do { char - > print(char) }<br>
<br>
</blockquote></div></div><div><br></div><div>No, I agree--the most obvious APIs that students run into should use code points. That can be done on top of a UTF-8-based string.</div><div><br></div><div>There are a lot of ins and outs to this conversation. The only part that's especially clear is that it's somewhat risky to define a new string type from scratch. Things are likely to work better if a Grace string compiles to a native string for the target platform.</div><div><br></div><div>That string can have Graceful methods on it, though, when viewed from a Grace program. Especially if I don't have to implement it and can just declare that somebody else will make it work!</div><div><br></div><div>Lex</div><div><br></div><div><br></div></div>