Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion correct terminology for referring to strings
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Richard O'Keefe  
View profile  
 More options Aug 1 2012, 9:58 pm
From: "Richard O'Keefe" <o...@cs.otago.ac.nz>
Date: Thu, 2 Aug 2012 13:58:42 +1200
Local: Wed, Aug 1 2012 9:58 pm
Subject: Re: [erlang-questions] correct terminology for referring to strings

On 1/08/2012, at 7:32 PM, Michael Turner wrote:

> On Wed, Aug 1, 2012 at 1:33 PM, Richard O'Keefe <o...@cs.otago.ac.nz> wrote:

>> On 31/07/2012, at 9:53 PM, Michael Turner wrote:

>>>> << An Erlang "string" is simply a list of integers.  Each integer can
>>>> represent any Unicode codepoint/character. >>

>>> Except that Unicode codepoints represents characters, right?

>> Wrong.

> Actually, what's *really* wrong in my statement is the grammar -- bad
> plural agreement.

No, what's wrong is the assertion that Unicode codepoints
represent characters.

> I'm certain this is correct, Richard, but ... what problem are we
> trying to solve again?

Having Joe not accidentally lying to his readers.

> IIRC: Joe is trying to come up with a short
> passage that explains what strings are, in Erlang. If he writes all
> that you wrote above, the reader (who might have been initially
> excited about Erlang) will come away with the impression, "Erlang
> people are excruciatingly pedantic".

Nobody ever said that >Joe< should say all that.

What he needs to say is something like
+++     Unicode is actually insanely complicated,
+++     but a good starting point is that each character
+++     named in the Unicode standard is assigned a
+++     unique integer called a codepoint,
+++     and an Erlang string is just a list of these numbers.

The phrase 'named in the standard' makes this literally true; it also
asserts that characters are given codepoints (true), not that
odepoints represent characters (false).

>>> << In Erlang, strings are represented as lists of integers. These
>>> integers are Unicode codepoints, each representing a character. >>

>>> That way, anybody who's unclear on what "codepoint" means gets a
>>> freebie definition of it. In the Unicode context, it's probably wrong,
>>> technically, but perhaps good enough for this purpose.

> Can anyone tell me why this *wouldn't* serve Joe's (== the typical
> reader's) purposes? [*]

Because it is dangerously wrong and misleading.
Why say what is untrue, when you can say something true that is
nearly as simple and serves the job just as well?
_______________________________________________
erlang-questions mailing list
erlang-questi...@erlang.org
http://erlang.org/mailman/listinfo/erlang-questions

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.