[erlang-questions] correct terminology for referring to strings

Michel Rijnders g.a.c.rijnders@REDACTED
Tue Jul 31 11:51:50 CEST 2012


On Tue, Jul 31, 2012 at 11:24 AM, Joe Armstrong <erlang@REDACTED> wrote:
> I'm working on a 2'nd edition of my book, and have got to strings :-)
> Strings confuse everybody, including me so I have a few questions:
>
> To start with Erlang doesn't have strings - it has lists (not strings)
> and it has string literals.
>
> I want to define a string - is this correct:
>
> << A "string" is a list of integers where the integers
>       represent Unicode codepoints. >>
>
> Questions:
>     Is the sentence inside << .. >> using the correct terminology?

Is the sentence refering to "strings" in Erlang or to strings in general?

For the first I prefer:
<< A "string" is represented by a list of integers, where the integers
are Unicode codepoints.>>

For the latter:
<< A "string" is a sequence of characters. >>

>     If not what should it say?
>
>     Is the sentence inside << ... >> widely understood, do you think this
>     would confuse a lot of people?
>
>     Is the phrase "string literal" widely understood?
>
>
> Cheers
>
> /Joe
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions



-- 
My other car is a cdr.



More information about the erlang-questions mailing list