<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Hah, oh that sounds fun!</p>
<p>I would develop something more lightweight and efficient, but
that would just make a 4th poison to choose from.</p>
<p>Gareth aka. Kit</p>
<p><br>
</p>
<div class="moz-cite-prefix">On 05/06/2019 08:01, Sven Barth via
fpc-devel wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAFMUeB_g+mBY1Qfrwa50Wer5fjVyZRepxvP4LdgmqZMUU4Qh8w@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="auto">
<div>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">J. Gareth Moreton <<a
href="mailto:gareth@moreton-family.com"
moz-do-not-send="true">gareth@moreton-family.com</a>>
schrieb am Di., 4. Juni 2019, 22:40:<br>
</div>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">Hi
everyone,<br>
<br>
I may be missing the obvious here, but I've noticed that
there are some <br>
notable absences in the Free Generics Library. While
there's a standard <br>
list and a map and the like, there aren't any of the
special lists like <br>
a stack and a queue and the like. It proved slightly
problematic while <br>
in a mentoring session with another programmer whom I was
introducing to <br>
Free Pascal, because our sample project required a stack.
The standard <br>
TStack uses pointers, which is not exactly portable.<br>
<br>
If not present, can I request the addition of TFPGStack
and TFPGQueue to <br>
the Free Generics Library? They should be simple
descendants of of <br>
TFPGList unless I'm missing something painfully obvious.
Or am I <br>
missing something even more obvious in that they are
defined elsewhere?<br>
</blockquote>
</div>
</div>
<div dir="auto"><br>
</div>
<div dir="auto">Just to add a bit to the other answer: FPC has
three generic libraries: fgl, fcl-stl and rtl-generics.</div>
<div dir="auto">fgl is the oldest and also served as a testbed
for the generics. It cycles together with the compiler and is
comparatively lightweight (at least to the other two), but has
some requirements when using records as parameters and the
performance isn't as good as that if rtl-generics. </div>
<div dir="auto">fcl-stl had been a contribution by a third party
developer for a C++-STL-like generics library.</div>
<div dir="auto">rtl-generics was also contributed by a third
party developer for Delphi compatibility, is rather
performant, but also rather heavy weight. </div>
<div dir="auto"><br>
</div>
<div dir="auto">You can also see a speed comparison here: <a
href="http://www.benibela.de/fpc-map-benchmark_en.html"
moz-do-not-send="true">http://www.benibela.de/fpc-map-benchmark_en.html</a></div>
<div dir="auto"><br>
</div>
<div dir="auto">In the end (if you don't need specific
functionality like a stack ;) ), it's a "pick your own poison"
problem :P</div>
<div dir="auto"><br>
</div>
<div dir="auto">Regards, </div>
<div dir="auto">Sven </div>
<div dir="auto">
<div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
</blockquote>
</div>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
fpc-devel maillist - <a class="moz-txt-link-abbreviated" href="mailto:fpc-devel@lists.freepascal.org">fpc-devel@lists.freepascal.org</a>
<a class="moz-txt-link-freetext" href="http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel">http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel</a>
</pre>
</blockquote>
<div id="DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2"><br />
<table style="border-top: 1px solid #D3D4DE;">
<tr>
<td style="width: 55px; padding-top: 13px;"><a href="https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient" target="_blank"><img src="https://ipmcdn.avast.com/images/icons/icon-envelope-tick-round-orange-animated-no-repeat-v1.gif" alt="" width="46" height="29" style="width: 46px; height: 29px;" /></a></td>
<td style="width: 470px; padding-top: 12px; color: #41424e; font-size: 13px; font-family: Arial, Helvetica, sans-serif; line-height: 18px;">Virus-free. <a href="https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient" target="_blank" style="color: #4453ea;">www.avast.com</a>
</td>
</tr>
</table><a href="#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2" width="1" height="1"> </a></div></body>
</html>