[fpc-devel] Unicode proceedings
Luca Olivetti
luca at ventoso.org
Thu Nov 17 10:04:34 CET 2011
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.
> Delphi provides an TBytes
> type for that purpose, and FPC could add more useful features to it.
I didn't know TBytes, I googled it, and it seems it's defined as an
array of byte, so it's not really as convenient to use as a string.
Bye
--
Luca
More information about the fpc-devel
mailing list