Re: [fpc-devel] strings: a proposeal

2007-02-04 Thread Florian Klaempfl
peter green schrieb: if my understanding is correct this should allow all the widestrings stuff to be moved to the library and people to implement thier own string types as required (for example maybe a widestring counterpart for some system that is similar to com) What's wrong with type tmy

Re: [fpc-devel] strings: a proposeal

2007-02-04 Thread Martin Schreiber
On Sunday 04 February 2007 10.57, Florian Klaempfl wrote: > peter green schrieb: > > if my understanding is correct this should allow all the widestrings > > stuff to be moved to the library and people to implement thier own > > string types as required (for example maybe a widestring counterpart >

Re: [fpc-devel] strings: a proposeal

2007-02-04 Thread Florian Klaempfl
Martin Schreiber schrieb: On Sunday 04 February 2007 10.57, Florian Klaempfl wrote: peter green schrieb: if my understanding is correct this should allow all the widestrings stuff to be moved to the library and people to implement thier own string types as required (for example maybe a widestri

Re: [fpc-devel] strings: a proposeal

2007-02-04 Thread Daniël Mantione
Op Sun, 4 Feb 2007, schreef Florian Klaempfl: > > - No unique check by assigning to character. > > True. But maybe we should simply allow to overload [] then. Not necessary, wrap it into an object and define a default property. Daniël___ fpc-devel m

Re: [fpc-devel] strings: a proposeal

2007-02-04 Thread Marco van de Voort
> Martin Schreiber schrieb: > > > > - Null based index. > > You can ignore the char 0? Then you need to implement a conversion for pwidechar(x). ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/f

Re: [fpc-devel] strings: a proposeal

2007-02-04 Thread Marco van de Voort
> Op Sun, 4 Feb 2007, schreef Florian Klaempfl: > > > > - No unique check by assigning to character. > > > > True. But maybe we should simply allow to overload [] then. > > Not necessary, wrap it into an object and define a default property. - Object is not refcounted, which is why dyn array is

RE: [fpc-devel] strings: a proposeal

2007-02-04 Thread peter green
> What's wrong with > > type >tmywidestring = type array of widechar; a number of things 1: afaict it lacks the automatic refcounting/copy on write semantics of strings 2: it doesn't allow specification of the allocators/deallocators which causes problems for its safe passing to dlls etc __

Re: [fpc-devel] strings: a proposeal

2007-02-04 Thread Daniël Mantione
Op Sun, 4 Feb 2007, schreef Marco van de Voort: > > Op Sun, 4 Feb 2007, schreef Florian Klaempfl: > > > > > > - No unique check by assigning to character. > > > > > > True. But maybe we should simply allow to overload [] then. > > > > Not necessary, wrap it into an object and define a default

Re: [fpc-devel] strings: a proposeal

2007-02-04 Thread Jonas Maebe
On 04 Feb 2007, at 12:01, Daniël Mantione wrote: Op Sun, 4 Feb 2007, schreef Florian Klaempfl: - No unique check by assigning to character. True. But maybe we should simply allow to overload [] then. Not necessary, wrap it into an object and define a default property. Then you can't tak

Re: [fpc-devel] strings: a proposeal

2007-02-04 Thread Martin Schreiber
On Sunday 04 February 2007 11.58, Florian Klaempfl wrote: > > - Null based index. > > You can ignore the char 0? > [...] Do you think it is possible with this methods to achieve the same or better performance as with ansi strings or refcounted widestrings? Martin

Re: [fpc-devel] strings: a proposeal

2007-02-04 Thread Daniël Mantione
Op Sun, 4 Feb 2007, schreef Martin Schreiber: > On Sunday 04 February 2007 11.58, Florian Klaempfl wrote: > > > - Null based index. > > > > You can ignore the char 0? > > > [...] > > Do you think it is possible with this methods to achieve the same or better > performance as with ansi strings

[fpc-devel] FreeAndNil implementation

2007-02-04 Thread Luiz Americo
Here is an interesting reading: http://blogs.codegear.com/abauer/archive/2006/11/01/28852.aspx Maybe, the suggested FreeAndNil implementation can be usefull. See in comments. BTW: Is the bellow afirmation also valid for fpc?? "we alluded to the fact that while the constructor of an object is

RE: [fpc-devel] FreeAndNil implementation

2007-02-04 Thread Thorsten Engler
> Here is an interesting reading: > http://blogs.codegear.com/abauer/archive/2006/11/01/28852.aspx > Maybe, the suggested FreeAndNil implementation can be > usefull. See in comments. Feel free to take it... But it's x86 specific asm code... > BTW: Is the bellow afirmation also valid for fpc?? >