[fpc-devel] Unicode proceedings

Michael Schnell mschnell at lumino.de
Thu Nov 17 11:17:33 CET 2011


On 11/17/2011 02:15 AM, Hans-Peter Diettrich wrote:
>
> Right, you continue to provide suggestions that only result in slow 
> code at runtime :-(
I did not say _anything_  about any kind of implementation, nor did I 
suggest that any of the alternative "suggested variants of definitions" 
is preferable.

The only suggestion I intended to offer is that _first_ a clear and 
straight definition of wow the stuff  is to behave from the users view 
should be agreed upon, and _afterward_ the details of an implementation 
should be discussed.


> Right, that's the *only* place where RawByteString makes sense.
IMHO doing functions the interface of which is encoding - independent is 
a very important case, especially regarding performance, as no 
conversion needs to be done when the function is called.So any 
definition that does not allow for this is lacking an important feature, 
and of course the use of a "general" String Type needs to be well defined.

(Of course the name "RawByteString" is a very bad choice for such a 
general string type that could be encoded e.g. as UTF-16).-

>
> Abusing strings for binary data is a bad idea. Delphi provides an 
> TBytes type for that purpose, and FPC could add more useful features 
> to it.
>
(As said I don't have XE so I don't know about TBytes.) Here the name 
"RawByteString" suggests exactly this kind of use.

Does TBytes provide reference counting and lazy copy ?

-Michael



More information about the fpc-devel mailing list