cpstrnew branch (was Re: [fpc-devel] Freepascal 2.4.0rc1 released)

Martin Schreiber fpmse at bluewin.ch
Mon Nov 9 17:20:17 CET 2009


On Monday 09 November 2009 16:34:52 Marco van de Voort wrote:
> In our previous episode, Martin Schreiber said:

> > Will there be a simple reference counted WideString on all platforms as
> > the current FPC UnicodeString is?
>
> Why does there need to be a widestring type if there is unicodestring? Is
> there some reason why unicodestring wouldn't work for you? IIRC you already
> have a MSESTring alias that you use everywhere, so it should be a matter of
> just changing what the alias points to depending on compiler version?
>
Performance and simplicity. MSEgui does not need the overhead of 
multi-encoding/multi-charsize. At the moment msestring=UnicodeString for FPC 
2.4 which is perfect. I fear FPC will drop this simple solution where it was 
ahead of Delphi.

> > WideString could be reference counted on all platforms and the current
> > not reference counted Windows WideString could be renamed to OLEString in
> > order
>
> ....
>
> This would break a lot of Delphi and COM code, and is IMHO not smart. If
> for some reason the old widestring implemention needs to continue (it is
> redundant if unicodestring is there?), it should get a different
> identifier.
>
No problem with me. What will be the new name? Although I find it strange that 
WideString is reference counted on Linux and the same WideString type is not 
reference counted on Windows and for porting COM code one could define 
WideString = OLEString or OLEString = WideString to be Delphi compatible.

Martin



More information about the fpc-devel mailing list