<p>Am 03.05.2017 14:37 schrieb "Tony Whyman via Lazarus" <<a href="mailto:lazarus@lists.lazarus-ide.org">lazarus@lists.lazarus-ide.org</a>>:<br>
> On the other hand, AnsiString and UnicodeString are still separate types. Why? Why should there not be a single unified string type with (e.g.) ASCII, UTF8 and UTF-16 (or MS Unicode) being just another code page?</p>
<p>Because indexed access to the string data would slow down quite a bit as the RTL would need to determine whether the string is a 1-Byte, 2-Byte, 4-Byte or multi Byte String. Yes the compiler could do optimizations for this inside loops, but it would definitely slow down -O- code.</p>
<p>Regards,<br>
Sven</p>