On Wed, 1 Mar 2006, L505 wrote:

> > > Widestrings need to be like that for compatibility with c and c++
>
> > Not exactly, they need to be like this because the dang MS COM.
> > However I can't see why is this different than the AnsiString vs
> > Windows PChar-based API...
>
>
> I'm off topic here but:
> I think there should be a standard reference counting mechanism (standards
> comittee?) between language. We have the standard ansi string header embedded 
> in
> the ansistring but no standard reference counting mechanism. If this was the
> case we could share our ansi strings in DLL's with C++ and other languages.

Ansistrings are unique to Object Pascal. The implementation of strings in C++
is completely different.

> However There are good reasons for using pchars especially during string
> concatenations - ansistrings are dead slow when you are making tons of small
> concatenations.

Sorry, but that is total nonsense. Not more than 'naive' pchars.

Another matter is that you will simply program it differently when using
pchars, because you know it from the start. Nothing prevents you from
programming it in the same way with Ansistrings. The RTL or FCL code
is full of examples of this.

Michael.

_________________________________________________________________
     To unsubscribe: mail [EMAIL PROTECTED] with
                "unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to