[fpc-devel] Unicodestring branch, please test and help fixing

listmember listmember at letterboxes.org
Wed Sep 10 07:15:02 CEST 2008


Graeme Geldenhuys wrote:
> I have to say I agree with you.... The Object Pascal / Delphi language
> already has way to many string types!  At it's just getting worse.
>
> I've always liked the Java style of everything being an object - even
> the string type.

The more I look at this Unicode issue, the more I believe we need a 
fundamental object aproach to it.

I mean, before a TString class, we need a TCharacter class in which we 
need to specify --amongst other things-- what language that character 
belongs to.

This kind of information is needed in order to properly manage the 
(upper-, lower-, title-, and camel-?) casing issues.

On top of this, we also need this information in order to be able to mix 
and match and display the LTR (left-to-right) and RTL (right-to-left) 
pieces of strings within the same string.

I have done some work on this, but there are at least 2 issues:

1) since each character is a class, memory requirements are increased 
several fold.

2) Again, the charater-as-class also means that the speed with wich we 
can create and destroy (and manipulate) a string is a lot slower.

I am, at this point, wondering if FPC's object creation/destroy code 
could be more optimized to be faster to help with this issue.

3) How do you handle the character sets when characters are objects?




More information about the fpc-devel mailing list