[Lazarus] dynamic string proposal

Michael Schnell mschnell at lumino.de
Wed Aug 16 18:06:36 CEST 2017


On 16.08.2017 17:55, Juha Manninen via Lazarus wrote:
> although Pos(), Copy() and Length() deal with CodeUnit resolution.
> I wonder how the new fancy string types would handle it without a
> performance penalty.
This again is not in the scope of the paper, and supposed to stay as it 
is. S[x], Pos(), and friends work in terms of "bytes per element" bytes.

The only difference to the current status is that with the "dynamic" 
string brand the content of the "bytes per element" field is not 
predefined by the variable declaration but can change when something is 
assigned to that (additional) brand of string variables (I feel that 
this is clearly stated in the paper). Hence for that (additional) brand 
of string variables the compiler needs to generate code to read this 
field when implementing the built-in functions.

-Michael




More information about the Lazarus mailing list