rtl-generics vs fgl

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

rtl-generics vs fgl

Graeme Geldenhuys-6
Hi,

Sorry if this is a silly question, I didn't really follow Generics
discussions in the past. If the "rtl-generics" package a replacement for
the fgl unit?

Going forward (FPC 3.0.2+), which Generics code are we supposed to use?


Regards,
  Graeme

--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

My public PGP key:  http://tinyurl.com/graeme-pgp
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: rtl-generics vs fgl

Michael Van Canneyt


On Sun, 19 Mar 2017, Graeme Geldenhuys wrote:

> Hi,
>
> Sorry if this is a silly question, I didn't really follow Generics
> discussions in the past. If the "rtl-generics" package a replacement for
> the fgl unit?

No, it is for Delphi compatibility. It contains also more classes/templates.

> Going forward (FPC 3.0.2+), which Generics code are we supposed to use?

You are free to choose either one. if you care about Delphi compatibility,
then you should use the units in rtl-generics.

Michael.
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: rtl-generics vs fgl

Graeme Geldenhuys-6
Thank you Michael.

Regards,
  Graeme

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: rtl-generics vs fgl

Free Pascal - General mailing list
In reply to this post by Graeme Geldenhuys-6

Am 19.03.2017 10:10 schrieb "Graeme Geldenhuys" <[hidden email]>:
>
> Hi,
>
> Sorry if this is a silly question, I didn't really follow Generics
> discussions in the past. If the "rtl-generics" package a replacement for
> the fgl unit?

The fgl unit is more lightweight while rtl-generics might provide better performance.

Regards,
Sven


_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: rtl-generics vs fgl

Marco van de Voort
In our previous episode, Sven Barth via fpc-pascal said:
> > Sorry if this is a silly question, I didn't really follow Generics
> > discussions in the past. If the "rtl-generics" package a replacement for
> > the fgl unit?
>
> The fgl unit is more lightweight while rtl-generics might provide better
> performance.

Performance is a multi edges sword anyway.

For a site that shows some benchmarking results for commonly used FPC hashes
(though actually more generic maps) see

http://forum.lazarus-ide.org/index.php/topic,34348.msg225877.html#msg225877

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: rtl-generics vs fgl

Florian Klaempfl
In reply to this post by Graeme Geldenhuys-6
Am 19.03.2017 um 10:10 schrieb Graeme Geldenhuys:
> Hi,
>
> Sorry if this is a silly question, I didn't really follow Generics
> discussions in the past. If the "rtl-generics" package a replacement for
> the fgl unit?
>
> Going forward (FPC 3.0.2+), which Generics code are we supposed to use?

The "FPC way" is fgl, the delphi compatible way is rtl-generics.

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: rtl-generics vs fgl

Graeme Geldenhuys-6
On 2017-03-19 18:00, Florian Klämpfl wrote:
> The "FPC way" is fgl, the delphi compatible way is rtl-generics.


Thanks everybody - very useful information. At least now I know when to
use which one.


Regards,
  Graeme

--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

My public PGP key:  http://tinyurl.com/graeme-pgp
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal