<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
On 24.08.2012 16:14, Mark Morgan Lloyd wrote:
<blockquote cite="mid:k17unl$53u$1@pye-srv-01.telemetry.co.uk"
type="cite">I wonder if I could ask a silly question. My
understanding is that strings are pretty much unique in not being
objects, and relying on a fair amount of compiler and RTL wizardry
to handle reference counting etc.
<br>
<br>
I note somebody at Embarcadero blogging [Paraphrase follows]
"Delphi is being enhanced by adding memory management features
such as reference counting".
<br>
<br>
Would there be any advantage in reimplementing strings as a tree
of classes, with the compiler doing appropriate things to change
e.g. Pos() into String.Pos(), UnicodeString.Pos() or whatever as
appropriate?
<br>
<br>
</blockquote>
<font face="Liberation Sans">String is the automatic
reference-counted object.<br>
<br>
But FPC team always denies this :))) citing Pascal standards of
passed century.<br>
<br>
Btw<br>
<br>
</font><tt>var <br>
s:utf8string;<br>
<a class="moz-txt-link-freetext" href="ws:UnicodeString">ws:UnicodeString</a>; <br>
<br>
i:=s.length();<br>
<br>
<a class="moz-txt-link-freetext" href="ws:=s.convert(UTF-16)">ws:=s.convert(UTF-16)</a>;<br>
</tt><font face="Liberation Sans"><br>
<br>
much more readable and causes less headache.<br>
<br>
regards,<br>
Anton<br>
</font>
</body>
</html>