[fpc-devel] Unicode proceedings
Sven Barth
pascaldragon at googlemail.com
Thu Nov 17 14:44:04 CET 2011
Am 17.11.2011 10:04, schrieb Luca Olivetti:
> Al 17/11/2011 2:15, En/na Hans-Peter Diettrich ha escrit:
>
>> Abusing strings for binary data is a bad idea.
>
> I use strings extensively as buffers: strings in delphi/fpc {$H+} are so
> convenient to use that the eventual performance hit doesn't matter to me.
> You know, I like the fact that I can simply do a
>
> ReceiveBuffer:=ReceiveBuffer+NewData
>
> without risking a buffer overflow, or that I can just use Copy to
> extract part of the buffer, etc., etc.
One could implement a similar type for something like this (maybe even
use the mentioned TBytes) and define operator overloads for it (at least
for "+").
Regards,
Sven
More information about the fpc-devel
mailing list