<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body smarttemplateinserted="true">
<div id="smartTemplate4-template">Hi,<br>
</div>
<div>
<blockquote type="cite"><br>
Depends on your code. </blockquote>
</div>
<div><br>
</div>
<div><br>
</div>
<div>I wrote all my code in Delphi 4. From 1998 or so. I do not make
new projects, only maintain old ones.<br>
</div>
<div><br>
</div>
<div>Delphi 4 felt much better. <br>
</div>
<div><br>
</div>
<div>Like take:<br>
<br>
procedure test;<br>
var s: string;<br>
begin<br>
s:= 'abc';<br>
end;</div>
<div><br>
</div>
<div>And Delphi 4 produces great looking output. 64 bytes. A few mov
and push for exception handling:<br>
</div>
<div><br>
<img src="cid:part1.o3uul8fS.e8g073nG@benibela.de" alt="" class="">
<p> </p>
<p><br>
</p>
<p>FPC nowadays. 103 bytes. 4 functions calls for exception
handling! 3 even if there are no exceptions. Unbelievable that
it needs that many function calls<br>
</p>
<br>
<div><img src="cid:part2.X3xyhsgD.Jndcjyz3@benibela.de" alt=""
class=""></div>
<br>
</div>
<div><br>
</div>
<div><br>
</div>
<div>
<blockquote type="cite"><br>
<br>
Nobody forces you to use ansistrings or unicodestrings. You can
perfectly write your own library for string management if you
are <br>
so inclined. <br>
</blockquote>
</div>
<div><br>
</div>
<div>I wrote my own using pchars:
<a class="moz-txt-link-freetext" href="https://github.com/benibela/bbutils/blob/master/bbutils.pas#L328-L950">https://github.com/benibela/bbutils/blob/master/bbutils.pas#L328-L950</a><br>
<br>
</div>
<div><br>
</div>
<div><br>
</div>
<div> Sincerely,<br>
Benito <br>
</div>
<div class="moz-cite-prefix">On 22.05.23 23:06, Michael Van Canneyt
via fpc-pascal wrote:<br>
</div>
<blockquote type="cite"
cite="mid:alpine.DEB.2.22.394.2305222301180.303959@home"> <br>
<br>
On Mon, 22 May 2023, Benito van der Zander via fpc-pascal wrote: <br>
<br>
<blockquote type="cite">Hi, <br>
<br>
<blockquote type="cite"> <br>
The compiler will do this wrapping anyway if you use
ansistrings, so the <br>
approach with e.g. a generic record will not cause a lot of
overhead in most <br>
cases. </blockquote>
<br>
But using strings or anything similar causes a lot of overhead <br>
<br>
It is really bad <br>
</blockquote>
<br>
Depends on your code. <br>
<br>
Nobody forces you to use ansistrings or unicodestrings. You can
perfectly write your own library for string management if you are
<br>
so inclined. <br>
<br>
But I for one am grateful that I don't need to bother with memory
management for <br>
strings, except perhaps on special occasions. <br>
<br>
So I think it is really good. <br>
<br>
Michael. <br>
_______________________________________________ <br>
fpc-pascal maillist - <a class="moz-txt-link-abbreviated
moz-txt-link-freetext"
href="mailto:fpc-pascal@lists.freepascal.org">fpc-pascal@lists.freepascal.org</a>
<br>
<a class="moz-txt-link-freetext"
href="https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal">https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal</a>
<br>
</blockquote>
</body>
</html>