When dynamic strings are used all around, is the use of pointers to ShortString still recommended? (fmodule contains a lot of them)

In many cases (almost all I found) the strings are duplicated when assigned, because the given dynamic strings disallow to simply copy the reference.

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.

DoDi

_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to