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

Marco van de Voort marcov at stack.nl
Tue Sep 9 13:56:14 CEST 2008


In our previous episode, Graeme Geldenhuys said:

> >  The Pascal huge strings always annoy me. Since - it is IMPLICIT
> >  automatic object with set of overloaded methods,
> >  length and reference count fields etc hidden from developer.
> >
> >  In near future we geat a Zoo of the strings:
> >  AnsiString, WideString, UnicodeString, ShortString, PWideChar, PChar
> >  Some of them with encoding field.
> 
> 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.

Well, then only use one? What is the problem? As soon as the RTL is
unicodestring enabled, throw away anything that is not unicode, create
everything new in unicode, and be done with it.

Legacy always causes ballast.
 
> I've always liked the Java style of everything being an object - even
> the string type.

It creates a lot of troubles (very visible in Java with its need for
stringbuilder), but it is not exactly clear what it solves.



More information about the fpc-devel mailing list