florian at freepascal.org
Thu Sep 9 15:52:38 CEST 2010
Am 09.09.2010 15:52, schrieb Hans-Peter Diettrich:
> When dynamic strings are used all around, is the use of pointers to
> ShortString still recommended? (fmodule contains a lot of them)
1. Ancient code, keep in mind, most code not being back end code was
written ~10 years ago. At this time we even could not depend on
perfectly working ansistrings.
2. Ansistring create an explicit exception frame etc. which slows down
Due to the explicit exception frame generation, I would propose not to
change it but only if the length limitation is a problem.
> In many cases (almost all I found) the strings are duplicated when
> assigned, because the given dynamic strings disallow to simply copy the
> IMO P[Short]Strings only were useful when the referenced string shall be
> changed later, with that change reflected automatically in all
> references. Since this seems not to occur anywhere, I'd suggest to
> replace or retype PShortString by [Ansi]String.
> fpc-devel maillist - fpc-devel at lists.freepascal.org
More information about the fpc-devel