[Lazarus] dynamic string proposal
Martin Frb
lazarus at mfriebe.de
Wed Aug 16 18:53:16 CEST 2017
On 16/08/2017 16:55, Juha Manninen via Lazarus wrote:
> On Wed, Aug 16, 2017 at 6:24 PM, Martin Frb via Lazarus
> <lazarus at lists.lazarus-ide.org> wrote:
>> Actually no.
> I know CodeUnit and CodePoint are not called "character" officially by
> the Unicode Standard.
> They however are called "character" in normal communication.
And that is where the problem starts.
As long as people do this, even if they know it is incorrect, others
will pick it up, and others will learn the wrong concepts.
Calling codepoints = char, means that newcomers will think s[x] is a
valid way to deal with chars.
And that is wrong, even in utf32.
> For example in the "String vs WideString" thread most people used
> "character" as a synonym for CodePoint.
Lots of people used the word character as if they where the same as
codeunit.
But the questions is did they use it as synonym? I.e did they know they
were substituting with the wrong word?
If so, why would they intentionally use misleading terms?
> For CodeUnit the term is very logical for historical reasons as the
> type "Char" is a short form of "Character".
That is why today it is a misnomer.
So using "char" (the type) as reference to "codepoint" is something we
have to do, because today the type "char" is for codepoints.
That is different from the English word "char" and that can cause a huge
confusion.
The English word "character" however is unambitious. It is not the name
of a type. So it refers to character only, not to codepoint.
More information about the Lazarus
mailing list