<div dir="ltr">Hi!<div><br></div><div>I have a few thoughts about this. I would favor the proposed syntax, but not if things don't get simpler. What I mean is that there's more to consider.</div><div><br></div><div>- Some modules don't handle binary strings, but lists of chars; most notably erl_scan. If the syntaxes are too close, it might be even more confusing when to use which form.</div><div>- The new string functions work with strings as sequences of lexemes. The "list strings" are lists of characters, so for example calling length() on the two representations of the same text may not return the same value. Most notably, CRLF is a lexeme, but two characters.</div><div>- When working with a textual protocol, it's still quite often that one would use <<"prefix"/utf8, Rest/binary>>, where the current syntax still has to be used. It might be confusing? </div><div>- The predefined type string() is  still <span style="color:rgb(26,26,26);font-family:mono,Courier,monospace;font-size:11.2px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:left;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(243,243,243);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">[char()], </span>and for binary strings there is unicode:chardata(), which in not necessarily obvious (as these are handled by the string module).</div><div><br></div><div>best regards,</div><div>Vlad</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr">On Wed, Jun 6, 2018 at 1:37 PM Nathaniel Waisbrot <<a href="mailto:nathaniel@waisbrot.net">nathaniel@waisbrot.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Thanks for copying my email to the list, Sean. That's what happens when I stay up late writing emails.<br>
<br>
<br>
> - That UTF-8 has emerged as the universal standard for string data<br>
<br>
<br>
I think this is an important point. Your bin-string-marker proposal would actually be equivalent, I think, to <<"some string"/utf8>> which is a little more of a mouthful and therefore a better argument in favor of it.<br>
<br>
_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" rel="noreferrer" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
</blockquote></div>