I think you are really looking at two different problems here:<br><br>1. How to represent external, for example JSON, data in a suitable way, more specifically how to be able to see the difference between sequences and strings both represented by lists.<br>
<br>2. What is a good representation of "strings" in Erlang.<br><br>They are different problems. I personally feel that within an app you generally know what types of data you are working on, if a list is a string or a, well, list. If not you should probably think over how your app is designed.<br>
<br>The problem of representing external data in a suitable way should, of course, be handled by the boundary layer, and once past that there should be no ambiguity.<br><br>This is not saying that strings as lists of integers is the best way of representing them, but rather that not properly disambiguating strings and lists in the boundary layer is not a reason not to represent strings as lists.<br>
<br>Maybe there should be a character type, but think of the problems involved in introducing it. Not for the implementors my you, but for most existing apps. At least when using lists you don't have to worry about the internal representation as you would always have to do when using binaries, or another C-string like equivalent.<br>
<br>IMAO,<br>Robert<br><br><div class="gmail_quote">2009/4/13 Steve Davis <span dir="ltr"><<a href="mailto:steven.charles.davis@gmail.com">steven.charles.davis@gmail.com</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
<br>
On Apr 13, 4:39 pm, Steve Davis <<a href="mailto:steven.charles.davis@gmail.com">steven.charles.davis@gmail.com</a>><br>
wrote:<br>
<div class="im">> So would it be fair to say that, as a general design principle for<br>
> representing strings in erlang terms then a binary representation is<br>
> far more preferable than a "list of integers"?<br>
><br>
<br>
</div>Additionally<br>
<br>
1) do people tend to agree with Joe's guidance in that exchange<br>
re:couchdb, and if so why isn't it plastered all over the tutorials?<br>
3) Shouldn't the word "string" be banned from the debate about text in<br>
erlang apart from as a reference to a specific foreign data type?<br>
3) Are my questions too trite?<br>
<div><div></div><div class="h5">_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
<a href="http://www.erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://www.erlang.org/mailman/listinfo/erlang-questions</a><br>
</div></div></blockquote></div><br>