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 Syntax for user-defined infix operators
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
 
Marco van de Voort  
View profile  
 More options Oct 5 2009, 4:07 am
Newsgroups: comp.lang.misc
From: Marco van de Voort <mar...@stack.nl>
Date: Mon, 5 Oct 2009 08:07:11 +0000 (UTC)
Local: Mon, Oct 5 2009 4:07 am
Subject: Re: Syntax for user-defined infix operators
On 2009-10-05, Dmitry A. Kazakov <mail...@dmitry-kazakov.de> wrote:

>>> But which is better?

>> Depends on your definition of character. Is s[3] really a character, a
>> codepoint or just the granularity of your encoding (e.g. 2 with UTF-16,
>> while characters can be multiple 32-bit codepoints in theory)

> I think that character string should obviously consist of characters, where
> each character is a code point independently on the encoding. Or better to
> say it is of no matter which encoding String has. That is an implementation
> detail.

But in Unicode, (printable) characters can be multiple codepoints. Specially
languages that allow combining of accents need this iirc.

The trouble of using codepoints as character, is that to access s[n] you
have to parse the entire string till you find character n. Might be fine for
a scripting language, but can be a performance killer.

> To bring a particular encoding into the picture one should have strings of
> octets (for UTF-8) strings of words (UTF-16) etc. These are different types
> which basically have nothing to do with String.

I'm talking about any realistic choice to be used as internal storage inside
"String", and how it translates to String's properties. Other types not
included.

 
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.