<div dir="auto"><div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">J. Gareth Moreton <<a href="mailto:gareth@moreton-family.com">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">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>